|
|
@ -20,11 +20,13 @@ class Sanitize
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
MASTODON_STRICT ||= freeze_config(
|
|
|
|
MASTODON_STRICT ||= freeze_config(
|
|
|
|
elements: %w(p br span a),
|
|
|
|
elements: %w(p br span a abbr del pre blockquote code b strong i em h1 h2 h3 h4 h5),
|
|
|
|
|
|
|
|
|
|
|
|
attributes: {
|
|
|
|
attributes: {
|
|
|
|
'a' => %w(href rel class),
|
|
|
|
'a' => %w(href rel class title),
|
|
|
|
'span' => %w(class),
|
|
|
|
'span' => %w(class),
|
|
|
|
|
|
|
|
'abbr' => %w(title),
|
|
|
|
|
|
|
|
'blockquote' => %w(cite),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
add_attributes: {
|
|
|
|
add_attributes: {
|
|
|
@ -35,7 +37,8 @@ class Sanitize
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
protocols: {
|
|
|
|
protocols: {
|
|
|
|
'a' => { 'href' => HTTP_PROTOCOLS },
|
|
|
|
'a' => { 'href' => HTTP_PROTOCOLS },
|
|
|
|
|
|
|
|
'blockquote' => { 'cite' => HTTP_PROTOCOLS },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
transformers: [
|
|
|
|
transformers: [
|
|
|
|