License

Whether automatic escaping is enabled or not, you can mark a section of a
template to be escaped or not by using the autoescape tag:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

{%autoescape%} Everything will be automatically escaped in this block using the HTML strategy{%endautoescape%}{%autoescape'html'%} Everything will be automatically escaped in this block using the HTML strategy{%endautoescape%}{%autoescape'js'%} Everything will be automatically escaped in this block using the js escaping strategy{%endautoescape%}{%autoescapefalse%} Everything will be outputted as is in this block{%endautoescape%}

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