How To Interpreate Html Tags ?


I have a field that is populate with a rich text editor.

So in the database I have for exemple:

how to interpreate html tag such <strong> ?

I would like to do this in a gridView and to remove <strong> but to have the text in bold.



If it’s just for that tag, you could probably get away with a basic regular expression. Why do you want to remove the tag if it’s already making the text bold?

ho Ketih again you, thanhs !

No but the tag don’t make the text bold. I know my english is very bad so it is hard for me to excplain and for people to understand me ;D

In fact I don’t what to remove the tag, but just to intepreate the tag. Because until now I can see the tag in my grid view and I would like not see them but see them in bold text

add ‘type’=>‘raw’

$this->widget( 'CGridView', array(



		array( 'name'=>'column', 'type'=>'raw' ),




1 Like

In which case, you just need to set the type to ‘html’ in the column config. See here.

EDIT: Defeated by redguy’s ninja-fu yet again… >:(

I put :

‘type’ => ‘html’,



            'name' => 'nomMessageLangue',

            'type' => 'html',

            'value' => 'helpers::TruncateText($data->nomMessageLangue->texte_quod,50)',

            'header' => 'nom',



            'name' => 'modif_msg',

            'type' => 'html',

            'value' =>  'CHtml::image(helpers::evaluateTrick())',

            'header' => 'modifiable',


and that is working fine ! I had difficulty to render a image and with ‘type’ => ‘html’, it’is ok, too !

Thank you for your help !

yes its helpful… but in view only. not for database… in database html tags are not remove