Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit402d556

Browse files
committed
update the default Twig escape strategy
1 parent67deef2 commit402d556

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎reference/configuration/twig.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ TwigBundle Configuration ("twig")
6262
6363
<twig:config
6464
auto-reload="%kernel.debug%"
65-
autoescape="filename"
65+
autoescape="name"
6666
base-template-class="Twig_Template"
6767
cache="%kernel.cache_dir%/twig"
6868
charset="%kernel.charset%"
@@ -93,7 +93,7 @@ TwigBundle Configuration ("twig")
9393
'pi' => 3.14,
9494
),
9595
'auto_reload' => '%kernel.debug%',
96-
'autoescape' => 'filename',
96+
'autoescape' => 'name',
9797
'base_template_class' => 'Twig_Template',
9898
'cache' => '%kernel.cache_dir%/twig',
9999
'charset' => '%kernel.charset%',
@@ -127,7 +127,7 @@ compiled again automatically.
127127
autoescape
128128
~~~~~~~~~~
129129

130-
**type**: ``boolean`` or ``string`` **default**: ``'filename'``
130+
**type**: ``boolean`` or ``string`` **default**: ``'name'``
131131

132132
If set to ``false``, automatic escaping is disabled (you can still escape each content
133133
individually in the templates).
@@ -141,9 +141,9 @@ individually in the templates).
141141

142142
If set to a string, the template contents are escaped using the strategy with
143143
that name. Allowed values are ``html``, ``js``, ``css``, ``url``, ``html_attr``
144-
and ``filename``. The default value is ``filename``. This strategy escapes
145-
contentsaccording to thefilenameextension (e.g. it uses ``html`` for
146-
``*.html.twig``templates and ``js`` for ``*.js.html`` templates).
144+
and ``name``. The default value is ``name``. This strategy escapes contents
145+
according to thetemplate nameextension (e.g. it uses ``html`` for ``*.html.twig``
146+
templates and ``js`` for ``*.js.html`` templates).
147147

148148
..tip::
149149

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp