CForm elements encoding


'elements'=>array(

                'agree'=>array(

                    'type'=>'checkbox',

                    'onclick'=>'function(){ if ($(this).attr(\'checked\')) { $(\'#btnNext\').attr(\'disabled\', \'\'); } else { $(\'#btnNext\').attr(\'disabled\', \'disabled\'); } }'

                ),

in html onclick render with Encodes special characters, any solution?

As far as I’m aware, this doesn’t affect the browser’s interpretation of the script. Quite a few of my sites have had their onclick/onchange javascript HTML-entity encoded (see below), and function as expected across all browsers.

e.g.


onchange="$.fn.yiiListView.update('directory-items', {data: {pageSize:$(this).val() }} );"