Issues

ZF-2473: Zend_View_Helper_FormLabel

Description

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



icon.png

Label code:


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

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

Comments

I need this as well, I've checked www.w3.org/TR/html4/interact/forms.html#edef-LABEL" 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 :)