CreateUrl generates & instead "&amp";


Yesterday I started validating my code and I noticed everywhere I have used Yii::app()->createUrl function the output is not valid, atlaest validators are whining about it.

for example:

Yii::app()->createUrl(‘User/GetFigureImage’, array(‘model_id’ => $model_id, ‘filename’ => $image));



the url works, but shouldn’t ‘&’ be “&” instead ?

Is there workaround / solution around or do I have to mod the files… ?

ps. I’m just beginner.

Yii version 1.1.10

createUrl is not only for Html, so the output is not html encoded, you have to do it yourself.

CHtml::link() should encode & to & not sure if it does though.