Skip to content

Commit

Permalink
Deprecate autoescape option
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed May 4, 2022
1 parent fd334dd commit 2d90ff9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions reference/configuration/twig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ compiled again automatically.
autoescape
~~~~~~~~~~

.. deprecated:: 6.1

This option is deprecated since Symfony 6.1. If required, use the
``autoescape_service`` or ``autoescape_service_method`` option instead.

**type**: ``boolean`` or ``string`` **default**: ``'name'``

If set to ``false``, automatic escaping is disabled (you can still escape each content
Expand Down
2 changes: 1 addition & 1 deletion templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ to perform malicious actions.
To prevent this attack, use *"output escaping"* to transform the characters
which have special meaning (e.g. replace ``<`` by the ``&lt;`` HTML entity).
Symfony applications are safe by default because they perform automatic output
escaping thanks to the :ref:`Twig autoescape option <config-twig-autoescape>`:
escaping:

.. code-block:: html+twig

Expand Down

0 comments on commit 2d90ff9

Please sign in to comment.