diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 25812db61..51a1b05b0 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -28,6 +28,7 @@ use Friendica\Content\ContactSelector; use Friendica\Content\Item; use Friendica\Content\OEmbed; use Friendica\Content\Smilies; +use Friendica\Content\Text\HTMLPurifier_URIScheme_cid; use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Protocol; @@ -1874,6 +1875,8 @@ class BBCode $text ); + \HTMLPurifier_URISchemeRegistry::instance()->register('cid', new HTMLPurifier_URIScheme_cid()); + $config = \HTMLPurifier_HTML5Config::createDefault(); $config->set('HTML.Doctype', 'HTML5'); $config->set('HTML.SafeIframe', true); diff --git a/src/Content/Text/HTMLPurifier_URIScheme_cid.php b/src/Content/Text/HTMLPurifier_URIScheme_cid.php new file mode 100644 index 000000000..f11e646ef --- /dev/null +++ b/src/Content/Text/HTMLPurifier_URIScheme_cid.php @@ -0,0 +1,37 @@ +userinfo = null; + $uri->host = null; + $uri->port = null; + $uri->query = null; + // typecode check needed on path + return true; + } +}