about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-28 10:53:55 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:16 -0500
commit67cacb5ef8e198ad3f361399df69aa38971d0c26 (patch)
tree0c6e4442188ce1f6d8edc876196ddfd0d9399a0d /app/lib
parentaa9d09215480d2376d6425b8518092dd4644f5ae (diff)
[Formatting] Add support for details/summary, centering; use Monsterfork v1 styling
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/sanitize_config.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index 05131b674..74a1d93fb 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -30,6 +30,7 @@ class Sanitize
         next true if e =~ /^(h|p|u|dt|e)-/ # microformats classes
         next true if e =~ /^(mention|hashtag)$/ # semantic classes
         next true if e =~ /^(ellipsis|invisible)$/ # link formatting classes
+        next true if %w(center centered).include?(e)
       end
 
       node['class'] = class_list.join(' ')
@@ -64,7 +65,7 @@ class Sanitize
     end
 
     MASTODON_STRICT ||= freeze_config(
-      elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li img),
+      elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li img h6 s center details summary),
 
       attributes: {
         'a'          => %w(href rel class title),