Coding Filters
- addslashes - adds backslashes before quotation marks to escape them.
- escape - escapes HTML characters.
- escapejs - escapes characters used in JavaScript strings.
-
force_escape
- Almost identical to
escape
. -
json_script
- outputs a Python object as JSON inside of a
script
element. -
linebreaks
- converts newlines to
<br>
and<p>
tags. -
linebreaksbr
- converts all newline characters in
value
to<br>
tags. - pprint - Pretty prints a Python object. Used for debugging.
- safe - indicates that the value is known to be safe and therefore does not need to be escaped.
- striptags - strips HTML tags.