I am creating a form using the form builder in Symfony. I add an attribute to the twig file for my flags, which contains the ampersand and pound sign, Symfony automatically exits the ampersand, which stops its display correctly. Do I need to disable shielding at all in the twig file or controller, or completely disable it in the configuration?
{{ form_widget(form.checkbox, { 'attr': {'data-icon-checkmark': '󰀦', 'data-icon-checkmark-checked': '󰀧'} }) }}
I found several topics about this for Symfony versions 1.X, but nothing for 2.
Thanks!
source share