mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
[doc] switched a BC call
This commit is contained in:
+2
-2
@@ -348,10 +348,10 @@ tag, ``autoescape``, and a filter, ``raw``.
|
|||||||
When creating the escaper extension, you can switch on or off the global
|
When creating the escaper extension, you can switch on or off the global
|
||||||
output escaping strategy::
|
output escaping strategy::
|
||||||
|
|
||||||
$escaper = new Twig_Extension_Escaper(true);
|
$escaper = new Twig_Extension_Escaper('html');
|
||||||
$twig->addExtension($escaper);
|
$twig->addExtension($escaper);
|
||||||
|
|
||||||
If set to ``true``, all variables in templates are escaped (using the ``html``
|
If set to ``html``, all variables in templates are escaped (using the ``html``
|
||||||
escaping strategy), except those using the ``raw`` filter:
|
escaping strategy), except those using the ``raw`` filter:
|
||||||
|
|
||||||
.. code-block:: jinja
|
.. code-block:: jinja
|
||||||
|
|||||||
Reference in New Issue
Block a user