Update HTMLPurifier configuration and allow HTML5

This commit is contained in:
Kijin Sung 2016-03-11 15:29:42 +09:00
parent 1b8a41b077
commit b89818e13d
3 changed files with 281 additions and 154 deletions

View file

@ -815,8 +815,7 @@ function url_decode($str)
function purifierHtml(&$content)
{
$oPurifier = Purifier::getInstance();
$oPurifier->purify($content);
$content = Rhymix\Framework\Security\HTMLFilter::clean($content);
}
/**
@ -830,7 +829,7 @@ function removeHackTag($content)
$oEmbedFilter = EmbedFilter::getInstance();
$oEmbedFilter->check($content);
purifierHtml($content);
$content = Rhymix\Framework\Security\HTMLFilter::clean($content);
// change the specific tags to the common texts
$content = preg_replace('@<(\/?(?:html|body|head|title|meta|base|link|script|style|applet)(/*).*?>)@i', '&lt;$1', $content);