CreateUrl generates & instead "&amp";

Hello,

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));

outputs:

src="/aapelikoti/index.php/Asukkaat/GetFigureImage?model_id=1&filename=Ruska+4.jpg&tab=Profile"

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.