Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.608 kB

HTML escapes a text.

Applies HTML escaping to a string (see the :ref:`filter-escape` filter for details). In contrary to the escape filter, the force_escape filter is applied immediately and returns a new, escaped string. This is useful in the rare cases where you need multiple escaping or want to apply other filters to the escaped results. Normally, you want to use the :ref:`filter-escape` filter.

For example:

{{ value|force_escape }}

If the value is hel&lo then the output is hel&lo.

Jump to Line
Something went wrong with that request. Please try again.