diff options
author | James Lopez <james@jameslopez.es> | 2016-04-22 17:02:29 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-04-22 17:02:29 +0200 |
commit | b18bd9c85f0d925aaa6ecf531673958bd97082fc (patch) | |
tree | eea201c9c521ad35592774b773d6741fd6e43f92 /lib | |
parent | a0ede57dd68e16eb030da388bcfd130eed127494 (diff) | |
parent | a600b4b1c08c374e336cbd4226d2ff77c8ff9cca (diff) | |
download | gitlab-ce-b18bd9c85f0d925aaa6ecf531673958bd97082fc.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/external_link_filter.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/banzai/filter/external_link_filter.rb b/lib/banzai/filter/external_link_filter.rb index d179bea181e..38c4219518e 100644 --- a/lib/banzai/filter/external_link_filter.rb +++ b/lib/banzai/filter/external_link_filter.rb @@ -1,7 +1,6 @@ module Banzai module Filter - # HTML Filter to add a `rel="nofollow"` attribute to external links - # + # HTML Filter to modify the attributes of external links class ExternalLinkFilter < HTML::Pipeline::Filter def call doc.search('a').each do |node| @@ -15,7 +14,7 @@ module Banzai # Skip internal links next if link.start_with?(internal_url) - node.set_attribute('rel', 'nofollow') + node.set_attribute('rel', 'nofollow noreferrer') end doc |