diff options
author | Robert Speicher <robert@gitlab.com> | 2016-04-21 20:49:41 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-04-21 20:49:41 +0000 |
commit | 1ea2408ba351646ac60c88136ed8b9acc58c6557 (patch) | |
tree | 9722a8ad3feddc1bcf653ac12ebdec6cb618b832 /spec/features | |
parent | 0ae039d0a1da83d6e9b4cc4ffa20279ed9928a80 (diff) | |
parent | 72debd840cb76a5fc0929c0caeca179c39378680 (diff) | |
download | gitlab-ce-1ea2408ba351646ac60c88136ed8b9acc58c6557.tar.gz |
Merge branch 'dev_issue_15331' into 'master'
Fixes window.opener bug
Adds `noreferrer` value to rel attribute for external links
REF: https://gitlab.com/gitlab-org/gitlab-ce/issues/15331
See merge request !1953
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/markdown_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/features/markdown_spec.rb b/spec/features/markdown_spec.rb index 3d0d0e59fd7..0148c87084a 100644 --- a/spec/features/markdown_spec.rb +++ b/spec/features/markdown_spec.rb @@ -165,7 +165,12 @@ describe 'GitLab Markdown', feature: true do describe 'ExternalLinkFilter' do it 'adds nofollow to external link' do link = doc.at_css('a:contains("Google")') - expect(link.attr('rel')).to match 'nofollow' + expect(link.attr('rel')).to include('nofollow') + end + + it 'adds noreferrer to external link' do + link = doc.at_css('a:contains("Google")') + expect(link.attr('rel')).to include('noreferrer') end it 'ignores internal link' do |