about summary refs log tree commit diff
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-06-07 22:57:30 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-07 15:57:30 +0200
commit6bd6dcf6df37dea077c4c6af84d979a49dd058db (patch)
tree0ee8ba9f0dfc702af59629558e7607b2c3e27a78
parent28d292047207231631ed8a42257eff129c018868 (diff)
Allow "class" attribute on the "a" tag in sanitization (#3623)
This preserves `<a ... class="u-url mention">` from other Mastodon instances.
-rw-r--r--app/lib/sanitize_config.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index 22b46a3d3..9cf9b3db0 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -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),
       },