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

Appearance settings

Commit 041c42d

Browse filesBrowse files
author
Mathieu Lechat
committed
Allow trans filter to be safe
1 parent 1b92f06 commit 041c42d
Copy full SHA for 041c42d

File tree

1 file changed

+7
-1
lines changed
Filter options

1 file changed

+7
-1
lines changed

‎src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,13 @@
219219
{% set label = name|humanize %}
220220
{%- endif -%}
221221
{%- endif -%}
222-
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}</label>
222+
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
223+
{%- if translation_domain is same as(false) -%}
224+
{{- label -}}
225+
{%- else -%}
226+
{{- label|trans({}, translation_domain) -}}
227+
{%- endif -%}
228+
</label>
223229
{%- endif -%}
224230
{%- endblock form_label -%}
225231

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.