I discovered HtmlPurifier doesn´t support HTML5 yet. So basically this doesn´t work as it should:
In a GridView widget:
[
'class' => DataColumn::className(),
'value' => function($model, $index, $widget) {
return '<time class="timeago" datetime="'.$model->addTime.'">'.$model->addTime.'</time>';
},
'format' => 'html',
'label' => 'Time',
],
Output:
<td>2014-01-27 15:50:15</td>
The <time> tag is completely removed by HtmlPurifier. Is there a way around this so i can use the <time> (and perhaps other HTML 5 tags) anyway?