escape_check¶
- Module: mod_base
See also
Ensures thant an HTML escaped value is properly escaped.
Checks for all reserved HTML characters if they are properly escaped.
Escaped strings are safe to be displayed in a HTML page. When you echo a query string argument or path variable then you must escape the value before displaying it on a HTML page.
The following characters are replaced:
Character | Replacement |
> |
> |
< |
< |
" |
" |
' |
' |
& |
& |
If you always want escaping to be applied, use the force_escape filter.
For example:
{{ value|escape_check }}
When the value is <hel&lo>
then the output is <hel&lo>
.