Anonymous Anonymous - 1 year ago
707 0

Example how to generate correct HTML markup in the form label.

Twig

Symfony2 Twig form label with HTML markup

# when username is your form element
{% autoescape false %}{{ form.username.vars.label | trans }}{% endautoescape %}