Problem With Chtml::image With Htmloptions

This code does not render attributes as wanted:




echo CHtml::image('http://google.com/images/srpr/logo3w.png', '', array(

    'data-original' => 'original',

    'another-attribute' => 'bla-bla-bla',

));



Result:




<img src="http://google.com/images/srpr/logo3w.png" another-attribute data-original alt/>



I’m using last version of chrome, and the previous version of Yii (i will edit version later)

Someone else has posted the very same problem: Stackoverflow

are you trying to put the alternative text display(alt).

it should be pass as diffrent parameter,i think it can’t be given via htmloptions

I am using following.

echo CHtml::image(‘http://google.com/images/srpr/logo3w.png’, ‘No Image’, array(

'data-original' =&gt; 'original',


'another-attribute' =&gt; 'bla-bla-bla',

));

If image not found then "No Image" text will be displayed. Try It.

Thankx.

Ravi Bhalodiya.

[color="#006400"]/* moved from Bug Discussions */[/color]