ollien ollien - 10 months ago 47
Python Question

New lines in flask within {%block content%}

So if I were to do something like

{% block content %}
{% endblock %}

in my HTML, and
is equal to
"Test <br /> test2"
how come the
prints out and does not make a new line? is there a way to fix this?


Jinja2 automatically escapes special characters for you. Probably simplest way is to use safe filter:

{{ variable|safe }}