From 6bd6dcf6df37dea077c4c6af84d979a49dd058db Mon Sep 17 00:00:00 2001
From: unarist <m.unarist@gmail.com>
Date: Wed, 7 Jun 2017 22:57:30 +0900
Subject: [PATCH] Allow "class" attribute on the "a" tag in sanitization
 (#3623)

This preserves `<a ... class="u-url mention">` from other Mastodon instances.
---
 app/lib/sanitize_config.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index 22b46a3d30..9cf9b3db0c 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),
       },
 
-- 
GitLab