diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-03-22 16:59:29 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-03-24 12:07:47 +0100 |
commit | 2c510ee00a9fb4141a428d9a21dbd561171b3409 (patch) | |
tree | b54c2d07b6ab38e827287865b93606daa5885d15 /spec/lib | |
parent | d101438b9d1bd827c191605cb21d58f83de2124d (diff) |
Fix glitch-soc marking every link in toots as a tag
Fixes #1281
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/sanitize_config_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/sanitize_config_spec.rb b/spec/lib/sanitize_config_spec.rb index 50558a0d8..2d82c00ea 100644 --- a/spec/lib/sanitize_config_spec.rb +++ b/spec/lib/sanitize_config_spec.rb @@ -28,7 +28,11 @@ describe Sanitize::Config do end it 'keeps a with href' do - expect(Sanitize.fragment('<a href="http://example.com">Test</a>', subject)).to eq '<a href="http://example.com" rel="nofollow noopener tag noreferrer" target="_blank">Test</a>' + expect(Sanitize.fragment('<a href="http://example.com">Test</a>', subject)).to eq '<a href="http://example.com" rel="nofollow noopener noreferrer" target="_blank">Test</a>' + end + + it 'keeps a with href and rel tag' do + expect(Sanitize.fragment('<a href="http://example.com" rel="tag">Test</a>', subject)).to eq '<a href="http://example.com" rel="nofollow noopener noreferrer tag" target="_blank">Test</a>' end end end |