about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/sanitize_config.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index 7cf1c3062..90098969f 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -12,6 +12,13 @@ class Sanitize
         'span' => %w(class),
       },
 
+      add_attributes: {
+        'a' => {
+          'rel' => 'nofollow noopener',
+          'target' => '_blank',
+        },
+      },
+
       protocols: {
         'a' => { 'href' => HTTP_PROTOCOLS },
       }