Disable HTML escaping in Django's TextField

evgeniuz picture evgeniuz · Jan 17, 2010 · Viewed 16.5k times · Source

How can I turn off Django's automatic HTML escaping, when I write into model's TextField?

Answer

bjunix picture bjunix · Feb 15, 2010

Just use django's safe filter. In your template you would do something like this:

{{ instance.my_text_field|safe }}