Question:
I have a python variable is defined as follows:
var = <p>some text</p>
I’d like to pass this in to HTML with Flask like this: {{ var }}. It should show up on the website as simply displaying the words “some text” but instead shows up as “<p>some text</p>” to the user and is not in a <p> tag.
And that works because Flask is kinda using innerText instead of innerHTML (idk if you’ve ever used those properties). If you just made the variable a text node, then you wouldn’t need the safe thing I believe.