[Fixed]-Django: Why is this output HTML-escaped

22👍

Do you mean the output of each.text is escaped and you see the text in your browser rather than the rendered markup?

This is because Django’s template engine autoescapes output by default for security reasons. You might want to use the builtin safe filter like this:

<div class="content video">{{ each.text|safe }}</div>

Or another way is to use mark_safe in your view.

Leave a comment