Jul-07-2022, 09:24 PM
Hi everyone,
I'm loading a yaml file into Flask with
I know about the Jinja escaping (I've try everything) but I think the problem lay somewhere else..
It's weird as in the Browser developer tools, this text if fully grey-out (even the html tags... )
Any ideas ?
Edit:
I've run

edit2:
I've try without yaml
like this
I'm loading a yaml file into Flask with
with open('myfile.yml', 'r') as file: TheYaml = yaml.safe_load(file)In my .html template I'm loading what I need from this yaml like this with Jinja
{{ [TheYaml["akey"] }}The value of this key is loaded in the html but any HTML tag for exemple <br> is not parsed by the browser !
I know about the Jinja escaping (I've try everything) but I think the problem lay somewhere else..
It's weird as in the Browser developer tools, this text if fully grey-out (even the html tags... )
Any ideas ?
Edit:
I've run
type([TheYaml["akey"])
Output:<class 'str'>
so everything look ok.. 
edit2:
I've try without yaml
like this
return render_template('content.html', testing={"a_test": "let <b>try</b> it"})I have the same problem.. the <b> and </b> are not parsed. so the problem si not the yaml.. but the Jinja/ Flask ??