diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-18 10:47:18 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-18 10:47:23 -0500 |
commit | 110f5a16547865156c5cae10d0d6171dab442029 (patch) | |
tree | 583a235f2ea915a25d7ecbae172ff19725196a6a /spec | |
parent | b46b52af37fd8c800e8fdca5de25be31415c7d5d (diff) | |
download | gitlab-ce-110f5a16547865156c5cae10d0d6171dab442029.tar.gz |
Catch all URI errors in ExternalLinkFilterdm-catch-uri-errors
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/banzai/filter/external_link_filter_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/external_link_filter_spec.rb b/spec/lib/banzai/filter/external_link_filter_spec.rb index 6f6c215be87..0f8ec8de7a0 100644 --- a/spec/lib/banzai/filter/external_link_filter_spec.rb +++ b/spec/lib/banzai/filter/external_link_filter_spec.rb @@ -55,6 +55,13 @@ describe Banzai::Filter::ExternalLinkFilter, lib: true do expect(doc.to_html).to eq(expected) end + + it 'skips improperly formatted mailtos' do + doc = filter %q(<p><a href="mailto://jblogs@example.com">Email</a></p>) + expected = %q(<p><a href="mailto://jblogs@example.com">Email</a></p>) + + expect(doc.to_html).to eq(expected) + end end context 'for links with a username' do |