symfony/symfony — pull request #4543 by Dinduks (2012-06-09 21:31:05+00:00)
Title: [Form] Add escape_label option

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: Coming soon

---

This option simply tells Twig to not escape a form's label.

``` php
->add('acceptRules', 'checkbox', array(
'property_path' => false,
'label' => 'I accept the rules',
'escape_label' => false,
));
```

It is set to false by default, and thus doesn't break BC.

*I'm aware that this option may lead to writing dirty code sometimes, but I believe the choice is up to the developer ; it can't hurt if one knows what he's doing. Besides, it'd save time when writing simple forms.*