V
V
vfvnvsyevsky2015-03-22 17:14:16
Django
vfvnvsyevsky, 2015-03-22 17:14:16

How can I prevent django from escaping certain tags when outputting to a template?

Actually how to remove auto-escaping for a tag <br>for example?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey K, 2015-03-22
@mututunus

from django.utils.safestring import mark_safe

mark_save('some html')

A
Alexander Pinkevich, 2015-03-23
@pinkevich

{{ context|safe }}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question