Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a686a02

Browse files
committed
minor #16784 [TwigBundle] Deprecate autoescape option (wouterj)
This PR was merged into the 6.1 branch. Discussion ---------- [TwigBundle] Deprecate autoescape option Fixes #16722 Commits ------- 2d90ff9 Deprecate autoescape option
2 parents 86f822b + 2d90ff9 commit a686a02

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

reference/configuration/twig.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ compiled again automatically.
3939
autoescape
4040
~~~~~~~~~~
4141

42+
.. deprecated:: 6.1
43+
44+
This option is deprecated since Symfony 6.1. If required, use the
45+
``autoescape_service`` or ``autoescape_service_method`` option instead.
46+
4247
**type**: ``boolean`` or ``string`` **default**: ``'name'``
4348

4449
If set to ``false``, automatic escaping is disabled (you can still escape each content

templates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ to perform malicious actions.
10351035
To prevent this attack, use *"output escaping"* to transform the characters
10361036
which have special meaning (e.g. replace ``<`` by the ``&lt;`` HTML entity).
10371037
Symfony applications are safe by default because they perform automatic output
1038-
escaping thanks to the :ref:`Twig autoescape option <config-twig-autoescape>`:
1038+
escaping:
10391039

10401040
.. code-block:: html+twig
10411041

0 commit comments

Comments
 (0)