ZF-2473: Zend_View_Helper_FormLabel


Hello, I've tried to create label like this:


Label code:

<?= $this->formLabel('selectone', 'icon.png' ) ?>

And it escapes the output, so it passes img tag as an escaped string instead of tag.


I need this as well, I've checked" rel="nofollow">Label in W3C HTML Spec and it says that most inline element can be included inside , so I think it makes sense.

I will attach a patch. Thanks.

Adds support for boolean 'escape' parameter to formLabel() that would skip escaping.

You can now pass the attrib 'escape'; when set to a value evaluating to false, the label will not be escaped:

<?= $this->formLabel('foo', 'Some label!', array('escape' => false)) ?>

Nice :)