I'm using Yii as PHP Framework and when I need to display some information from database, I'm always using CHtml::encode to improve security.
My question is: Do I need to do the same when I display values at Yii widgets, such as TbDetailView or TbGridView?
For example, is the CHtml::encode necessary at the code below?
<?php $this->widget('bootstrap.widgets.TbDetailView',array(
'data'=>$model,
'attributes'=>array(
'id',
'nome',
'descricao',
'origem',
array('label'=>'Tipo de Refeição', 'value'=>CHtml::encode($model->tipoRefeicao ? $model->tipoRefeicao->nome : '')),
array('label'=>'Ativo', 'value'=>CHtml::encode($model->ativo ? 'Sim' : 'Não')),
),
)); ?>