Skip to content

Commit b841a25

Browse files
committed
minor symfony#6609 Use a better escaping mechanism for data-prototype attr (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Use a better escaping mechanism for data-prototype attr Twig defines the `html_attr` strategy to escape values to be included in HTML attributes. Let's use it instead of the generic strategy. Commits ------- 627e1a0 Use a better escaping mechanism for data-prototype attr
2 parents 963c3d2 + 627e1a0 commit b841a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/form/form_collections.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ new "tag" forms. To render it, make the following change to your template:
304304

305305
.. code-block:: html+twig
306306

307-
<ul class="tags" data-prototype="{{ form_widget(form.tags.vars.prototype)|e }}">
307+
<ul class="tags" data-prototype="{{ form_widget(form.tags.vars.prototype)|e('html_attr') }}">
308308
...
309309
</ul>
310310

0 commit comments

Comments
 (0)