I pass some text from Flask_app
to html
. I add a line break, <br>
, but it seems that it is ignored and all text gets printed on 1 line.
@app.route('/description/')
def description():
text = ['Line one <br> Line two']
return render_template('Untitled-21.html', text=text)
HTML File:
<h2 class="card-text"> {{ text }}</h2>
If I paste my text, as below, it works correctly:
<h2 class="card-text"> {{ Line one <br> Line two }}</h2>
Why is this line break ignored?