Lines Matching refs:escape
1 ``escape``
11 The ``escape`` filter escapes a string for safe insertion into the final
19 {{ user.username|escape }}
27 The ``escape`` filter can also be used in other contexts than HTML thanks to
36 And here is how to escape variables included in JavaScript code:
40 {{ user.username|escape('js') }}
43 The ``escape`` filter supports the following escaping strategies:
54 not be used to escape an entire URI; only a subcomponent being inserted.
60 Internally, ``escape`` uses the PHP native `htmlspecialchars`_ function
65 When using automatic escaping, Twig tries to not double-escape a variable
67 escape filter; but that does not work when using a variable as the
75 {{ var|escape('html') }} {# won't be double-escaped #}
76 {{ var|escape(strategy) }} {# will be double-escaped #}
87 {{ var|escape(strategy)|raw }} {# won't be double-escaped #}
95 used in the ``escape`` call) and the second one must be a valid PHP callable:
106 string to escape, and the charset.