Zend framework 在Zend_Form_元素描述装饰器中使用HTML

Zend framework 在Zend_Form_元素描述装饰器中使用HTML,zend-framework,zend-form-element,zend-decorators,Zend Framework,Zend Form Element,Zend Decorators,是否可以在Zend_表单中的描述装饰器中使用HTML?例如,以下语句不起作用: $number = new Zend_Form_Element_Text('number', array( 'size' => 32, 'description' => 'Please the the following website: <a href="foo/bar">lorem ipsum</a>', 'max_length' =&

是否可以在Zend_表单中的描述装饰器中使用HTML?例如,以下语句不起作用:

$number = new Zend_Form_Element_Text('number', array(
       'size' => 32,
       'description' => 'Please the the following website: <a href="foo/bar">lorem ipsum</a>',
       'max_length' => 100,
       'label' => 'Number'));
$number=new Zend\u Form\u Element\u Text('number',数组(
“大小”=>32,
'说明'=>'请访问以下网站:',
“最大长度”=>100,
“标签”=>“编号”);
说明中未显示链接,括号转换为特殊字符对应项


是否有其他方式显示链接(或使用HTML…?

有可能,您只需告诉
说明
装饰程序不要转义输出即可

尝试:

有关部分包括:

数组('Description',数组('class'=>'Description','escape'=> 假


这是可能的,您只需告诉
Description
decorator不要转义输出

尝试:

有关部分包括:

数组('Description',数组('class'=>'Description','escape'=> 假

$number = new Zend_Form_Element_Text('number', array(
   'size'        => 32,
   'description' => 'Please the the following website: <a href="foo/bar">lorem ipsum</a>',
   'max_length'  => 100,
   'label'       => 'Number')
);

$number->getDecorator('Description')->setOption('escape', false);
    $elementDecorators = array(
        'ViewHelper',
        'Errors',
        array('Description', array('class' => 'description', 'escape' => false)),
        array('HtmlTag',     array('class' => 'form-div')),
        array('Label',       array('class' => 'form-label', 'requiredSuffix' => '*'))
);