2๐
โ
A potentially unsafe way to so this is to change your html code to be {{htmltext|safe}}
however, depending on how the string is generated in your Python code, could lead to attacks on your website that inject arbitrary code into your HTML page.
The better option would be to put the HTML code <br>
in the HTML file, so use something like {{foo}}<br><br>{{bar}}
๐คthree_pineapples
Source:stackexchange.com