From 2686635f60702386871c92667b7e06586ba63a03 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 7 Feb 2016 12:50:26 +0100 Subject: [PATCH] Keep the rel="tag" in HTML when purifying --- lib/util.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util.php b/lib/util.php index 54296e1a4c..98d8ac220b 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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)); -- 2.39.5