From 2d90ff9a4f1f2a7adb763e59002178a09129d3de Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Wed, 4 May 2022 23:09:13 +0200 Subject: [PATCH] Deprecate autoescape option --- reference/configuration/twig.rst | 5 +++++ templates.rst | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index f0afefc533c..54961707833 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -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 diff --git a/templates.rst b/templates.rst index 0c679b0087d..e406445787b 100644 --- a/templates.rst +++ b/templates.rst @@ -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 ``<`` HTML entity). Symfony applications are safe by default because they perform automatic output -escaping thanks to the :ref:`Twig autoescape option `: +escaping: .. code-block:: html+twig