From 7a0dc34cad955fecba8072f5ed3c179ba5a3fd98 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 18 May 2019 13:03:36 -0500 Subject: 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 --- app/lib/sanitize_config.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/lib/sanitize_config.rb') 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: { -- cgit