I'm new to Flask, so I trying to display data from my dict in HTML.
next_data = '1111111\n222222'
data = {'next_data': next_data}
return render_template("data.html", data=data)
and this is my HTML page
<div>
<p>{{data['next_data']}}</p>
</div>
<div>
<p>{{data['name'}}</p>
</div>
the result I'm getting is a string with whitespace instead of \n
but my goal is that it should display '222222' on a new line. Any tips?
Expected output = 111111
222222