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

Skip to content

Commit 16cb242

Browse files
committed
[Twig] Remove the deprecated autoescape option
1 parent 1fc0bed commit 16cb242

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

reference/configuration/twig.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,6 @@ compiled again automatically.
3333

3434
.. _config-twig-autoescape:
3535

36-
autoescape
37-
~~~~~~~~~~
38-
39-
.. deprecated:: 6.1
40-
41-
This option is deprecated since Symfony 6.1. If required, use the
42-
``autoescape_service`` or ``autoescape_service_method`` option instead.
43-
44-
**type**: ``boolean`` or ``string`` **default**: ``name``
45-
46-
If set to ``false``, automatic escaping is disabled (you can still escape each content
47-
individually in the templates).
48-
49-
.. caution::
50-
51-
Setting this option to ``false`` is dangerous and it will make your
52-
application vulnerable to `XSS attacks`_ because most third-party bundles
53-
assume that auto-escaping is enabled and they don't escape contents
54-
themselves.
55-
56-
If set to a string, the template contents are escaped using the strategy with
57-
that name. Allowed values are ``html``, ``js``, ``css``, ``url``, ``html_attr``
58-
and ``name``. The default value is ``name``. This strategy escapes contents
59-
according to the template name extension (e.g. it uses ``html`` for ``*.html.twig``
60-
templates and ``js`` for ``*.js.twig`` templates).
61-
62-
.. tip::
63-
64-
See `autoescape_service`_ and `autoescape_service_method`_ to define your
65-
own escaping strategy.
66-
6736
autoescape_service
6837
~~~~~~~~~~~~~~~~~~
6938

0 commit comments

Comments
 (0)