]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Keep the rel="tag" in HTML when purifying
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 7 Feb 2016 11:50:26 +0000 (12:50 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 7 Feb 2016 11:50:26 +0000 (12:50 +0100)
lib/util.php

index 54296e1a4ca8f07e2dee8243cc621439a04ace89..98d8ac220b93c69b9cf695846989277a94754b16 100644 (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));