Forms 如何防止html内容';是否从转义中传递到sfFormField::renderRow()中?

Forms 如何防止html内容';是否从转义中传递到sfFormField::renderRow()中?,forms,view,symfony1,Forms,View,Symfony1,在symfony1.4视图中,我试图在sfFormField::renderRow函数的“attributes”参数中传递一些html/javascript: <?php echo $form['ownership_status_id']->renderRow(array('onFocus' => 'displayHelp("<p>help text</p>");'), 'Own/Rent')?> 尝试取消对$form变量的scape,如下所示:

在symfony1.4视图中,我试图在
sfFormField::renderRow
函数的“attributes”参数中传递一些html/javascript:

<?php echo $form['ownership_status_id']->renderRow(array('onFocus' => 'displayHelp("<p>help text</p>");'), 'Own/Rent')?>

尝试取消对$form变量的scape,如下所示:

sfOutputEscaperGetterDecorator::unescape($form);
然后调用renderRow():

我不得不使用这个:

<?php echo sfOutputEscaperGetterDecorator::unescape($form['ownership_status_id']->renderRow(array('onFocus' => 'displayHelp("<p>help text</p>");'), 'Own/Rent')); ?>

我在视图顶部添加了该调用,但似乎没有任何效果。javascript/html仍然被转义。
<?php echo $form['ownership_status_id']->renderRow(array('onFocus' => 'displayHelp("<p>help text</p>");'), 'Own/Rent'); ?>
<?php echo sfOutputEscaperGetterDecorator::unescape($form['ownership_status_id']->renderRow(array('onFocus' => 'displayHelp("<p>help text</p>");'), 'Own/Rent')); ?>