2008年7月29日星期二

Re: [fw-mvc] Unescaped options inside Zend_Form_Element_Select

I usually do this in the controller. $this->view-
>setEscape('stripslashes') or any other escape function you want to
use that won't convert special characters.

Adam


On Jul 29, 2008, at 8:34 PM, Ernesto wrote:

> Hello list, just a quick question:
>
> How can I get a Zend_Form_Element_Select populated without it's
> options being escaped?
>
> I need to populate a <select> with indented options according to the
> hierarchy of each one.
>
> $options = array(
> 23 => '&nbsp; Option 1'
> 24 => '&nbsp; &nbsp; Option 1.1'
> 46 => '&nbsp; Option 2'
> );
> $myZendFormElementObject->addMultioptions( $options );
>
> The result is I see the '&nbsp;'s
>
> I've checked the API and docs but I can't find anything.
>
> Thanks in advance.
>
>
>
> Best Regards,
> Ernesto

没有评论: