about summary refs log tree commit diff
path: root/app/lib/sanitize_config.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-18 13:03:36 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:50 -0500
commit7a0dc34cad955fecba8072f5ed3c179ba5a3fd98 (patch)
tree7e539207950bc274c5504bf5904a49abf0d9aca2 /app/lib/sanitize_config.rb
parent09b7532805a349d1a57f4a650c7f41456cda184b (diff)
reimplement monsterpit bbcode and markdown extensions on top of new glitch-soc formatting system + bbcode feature parity + new `i:am` footer + set content type from `format` bangtag
Diffstat (limited to 'app/lib/sanitize_config.rb')
-rw-r--r--app/lib/sanitize_config.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index db6f50ed1..9756f2ef6 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -14,6 +14,8 @@ 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 e =~ /^bbcode__([a-z1-6\-]+)$/ # bbcode
+        next true if e == 'signature'
       end
 
       node['class'] = class_list.join(' ')
@@ -23,10 +25,11 @@ class Sanitize
       elements: %w(p br span a abbr del pre sub sup blockquote code b strong u i em h1 h2 h3 h4 h5 h6 ul ol li hr),
 
       attributes: {
-        'a'          => %w(href rel class title),
+        'a'          => %w(href rel class title alt),
         'span'       => %w(class),
         'abbr'       => %w(title),
         'blockquote' => %w(cite),
+        'p'          => %w(class),
       },
 
       add_attributes: {