mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-19 05:46:41 +00:00
minor #2227 added a note about the default escaping strategy (fabpot)
This PR was merged into the 1.x branch.
Discussion
----------
added a note about the default escaping strategy
fixes #2061
Commits
-------
56556d7 added a note about the default escaping strategy
This commit is contained in:
@@ -6,8 +6,6 @@ template to be escaped or not by using the ``autoescape`` tag:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{# The following syntax works as of Twig 1.8 -- see the note below for previous versions #}
|
||||
|
||||
{% autoescape %}
|
||||
Everything will be automatically escaped in this block
|
||||
using the HTML strategy
|
||||
|
||||
+2
-4
@@ -424,10 +424,8 @@ everything by default.
|
||||
|
||||
Twig supports both, automatic escaping is enabled by default.
|
||||
|
||||
.. note::
|
||||
|
||||
Automatic escaping is only supported if the *escaper* extension has been
|
||||
enabled (which is the default).
|
||||
The automatic escaping strategy can be configured via the
|
||||
:ref:`autoescape<environment_options>` option and defaults to ``html``.
|
||||
|
||||
Working with Manual Escaping
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user