Internet explorer IE9/10 Yii菜单项链接选项中的引号->;onclick编码为&;引用

Internet explorer IE9/10 Yii菜单项链接选项中的引号->;onclick编码为&;引用,internet-explorer,yii,internet-explorer-9,internet-explorer-10,Internet Explorer,Yii,Internet Explorer 9,Internet Explorer 10,在IE9/10中,Yii菜单项 $this->menu=array( ... array('label'=>'Project Report', 'url'=>'#', 'linkOptions'=>array('onclick'=>'$("#projectDatePicker").dialog("open");$(".hidden-dialog").removeAttr("style"); return false;')), ... ?> 被渲染为

在IE9/10中,Yii菜单项

$this->menu=array(
...
array('label'=>'Project Report', 'url'=>'#',
    'linkOptions'=>array('onclick'=>'$("#projectDatePicker").dialog("open");$(".hidden-dialog").removeAttr("style"); return false;')),
...
?>
被渲染为

<a onclick="$(&quot;#projectDatePicker&quot;).dialog(&quot;open&quot;);$(&quot;.hidden-dialog&quot;).removeAttr(&quot;style&quot;); return false;"

我也做不到。我的解决方法:

$this->menu=array(
...
array('label'=>'Project Report', 'url'=>'#',
    'linkOptions'=>array('onclick'=>'openDialog()')),
...
?>

<?php Yii::app()->clientScript->registerScript('open-dialog', '
    function openDialog() {
        $("#projectDatePicker").dialog("open");
        $(".hidden-dialog").removeAttr("style");
        return false;
    }
', CClientScript::POS_END); ?>
$this->menu=array(
...
数组('label'=>'Project Report','url'=>'#',
'linkOptions'=>array('onclick'=>'openDialog()'),
...
?>

js:
是否尝试在javascript前面加上前缀?