Issues

ZF-2473: Zend_View_Helper_FormLabel

Issue Type: Bug Created: 2008-01-24T09:26:44.000+0000 Last Updated: 2008-02-26T12:55:57.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: Martin Hujer (mhujer) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: Attachments: - formLabel_escape.patch

Description

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

<pre class="highlight">

<img alt="icon.png" src="icon.png"></img>

Label code:

<pre class="highlight">
<?= $this->formLabel('selectone', '<img alt="icon.png" src="icon.png"></img>' ) ?>

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

Comments

Posted by Amr Mostafa (alienbrain) on 2008-02-07T09:44:24.000+0000

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.

Posted by Amr Mostafa (alienbrain) on 2008-02-07T09:47:22.000+0000

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

Posted by Matthew Weier O'Phinney (matthew) on 2008-02-13T08:40:12.000+0000

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

<pre class="highlight">
<?= $this->formLabel('foo', '<b>Some label!</b>', array('escape' => false)) ?>

Posted by Martin Hujer (mhujer) on 2008-02-13T08:52:10.000+0000

Nice :)

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts