Keep the rel="tag" in HTML when purifying

This commit is contained in:
Mikael Nordfeldth 2016-02-07 12:50:26 +01:00
parent 1126f70786
commit 2686635f60

View File

@ -580,6 +580,7 @@ function common_purify($html)
require_once INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php';
$cfg = HTMLPurifier_Config::createDefault();
$cfg->set('Attr.AllowedRel', ['bookmark', 'directory', 'enclosure', 'home', 'license', 'nofollow', 'payment', 'tag']); // http://microformats.org/wiki/rel
$cfg->set('HTML.ForbiddenAttributes', array('style')); // id, on* etc. are already filtered by default
$cfg->set('URI.AllowedSchemes', array_fill_keys(common_url_schemes(), true));