1👍
Django’s template engine will escape the text, such that if the text contains a < b
, it will render it as a < b
. You can disable this escaping with the |safe
template filter [Django-doc]:
{% for chat_stream in chat %}
<p>
{% if forloop.last %}
{% else %}
<b>bot:</b> <br> {{ chat_stream.ss|safe }} <br>
<b>{{ user }}:</b> <br> {{ chat_stream.user }} <br>
{% endif %}
</p>
{% endfor %}
Source:stackexchange.com