1

Possible Duplicate:
Passing html to template

I am using jinja2 templates. And I use its autoescape function to escape all the users input. But I am creating wiki, so for the content of the wiki page, I would like not to escape users input. How I can manage that?

Community
  • 1
  • 1
user1322731
  • 71
  • 1
  • 7

1 Answers1

5

Mark the content as safe:

{{ content|safe }}

From the docs:

Working with Automatic Escaping

When automatic escaping is enabled everything is escaped by default except for values explicitly marked as safe. Those can either be marked by the application or in the template by using the |safe filter.

Blender
  • 289,723
  • 53
  • 439
  • 496