From 877023fb2141eb9014c8c32e45fd318203101a65 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 26 Apr 2020 23:10:21 -0600 Subject: [PATCH] Update purify config, fix microformats support --- config/purify.php | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/config/purify.php b/config/purify.php index da156c5f7..681f55dd6 100644 --- a/config/purify.php +++ b/config/purify.php @@ -68,8 +68,8 @@ return [ */ 'HTML.Allowed' => env('RESTRICT_HTML_TYPES', true) ? - 'a[href|title|rel],p,span,br' : - 'a[href|title|rel],p,span,strong,em,del,b,i,s,strike,h1,h2,h3,h4,h5,h6,ul,ol,li,br', + 'a[href|title|rel|class],p[class],span[class],br' : + 'a[href|title|rel|class],p[class],span[class],strong,em,del,b,i,s,strike,h1,h2,h3,h4,h5,h6,ul,ol,li,br', /* @@ -133,6 +133,27 @@ return [ 'AutoFormat.RemoveEmpty' => false, + 'Attr.AllowedClasses' => [ + 'h-feed', + 'h-entry', + 'h-cite', + 'h-card', + 'p-author', + 'p-name', + 'p-in-reply-to', + 'p-repost-of', + 'p-comment', + 'u-photo', + 'u-uid', + 'u-url', + 'dt-published', + 'e-content', + 'mention', + 'hashtag', + 'ellipsis', + 'invisible' + ], + 'Attr.AllowedRel' => [ 'noreferrer', 'noopener',