8000 [TwigBundle] Deprecate autoescape option by wouterj · Pull Request #16784 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content
8000

[TwigBundle] Deprecate autoescape option #16784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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