Html5 Support In Htmlpurifier

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',



<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?

Can you change the format to



Indeed it does support only tags that are in HTML4. That’s should cover most of content tags used in HTML5. HTMLPurifier author said he’s not going to work on it anytime soon. At least by himself.

Thanks, that works!