ollien ollien - 2 months ago 7x
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 }}