]> cat aescling's git repositories - mastodon.git/commitdiff
Allow "class" attribute on the "a" tag in sanitization (#3623)
authorunarist <m.unarist@gmail.com>
Wed, 7 Jun 2017 13:57:30 +0000 (22:57 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 7 Jun 2017 13:57:30 +0000 (15:57 +0200)
This preserves `<a ... class="u-url mention">` from other Mastodon instances.

app/lib/sanitize_config.rb

index 22b46a3d30c2e23e56bbe0f6bc47f17d3db8af51..9cf9b3db0c90b530630962817f1a2f1e5b9078aa 100644 (file)
@@ -8,7 +8,7 @@ class Sanitize
       elements: %w(p br span a),
 
       attributes: {
-        'a'    => %w(href rel),
+        'a'    => %w(href rel class),
         'span' => %w(class),
       },