Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 20 lines (13 sloc) 0.608 kB
d125f98 @arjan doc: Another big batch of filter docs
arjan authored
1 .. highlight:: django
b11a84e @kaos doc: rearranged ref docs to include the meta doc.
kaos authored
2 .. include:: meta-force_escape.rst
34f54cc @kaos Added documentation stubs.
kaos authored
3
d125f98 @arjan doc: Another big batch of filter docs
arjan authored
4 HTML escapes a text.
5
6 Applies HTML escaping to a string (see the :ref:`filter-escape` filter
7 for details). In contrary to the `escape` filter, the `force_escape`
8 filter is applied `immediately` and returns a new, escaped
9 string. This is useful in the rare cases where you need multiple
10 escaping or want to apply other filters to the escaped
11 results. Normally, you want to use the :ref:`filter-escape` filter.
12
13 For example::
14
15 {{ value|force_escape }}
16
96b0493 @mworrell doc: add filter-truncate_html docs, document extra arg for filter-tru…
mworrell authored
17 If the value is ``hel&lo`` then the output is ``hel&lo``.
d125f98 @arjan doc: Another big batch of filter docs
arjan authored
18
19 .. seealso:: :ref:`filter-escape`
Something went wrong with that request. Please try again.