diff options
Diffstat (limited to 'spec/lib/sanitize_config_spec.rb')
-rw-r--r-- | spec/lib/sanitize_config_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/sanitize_config_spec.rb b/spec/lib/sanitize_config_spec.rb index c5143bcef..faefac803 100644 --- a/spec/lib/sanitize_config_spec.rb +++ b/spec/lib/sanitize_config_spec.rb @@ -14,5 +14,9 @@ describe Sanitize::Config do it 'keeps ul' do expect(Sanitize.fragment('<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>', subject)).to eq '<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>' end + + it 'keep links in lists' do + expect(Sanitize.fragment('<p>Check out:</p><ul><li><a href="https://joinmastodon.org" rel="nofollow noopener" target="_blank">joinmastodon.org</a></li><li>Bar</li></ul>', subject)).to eq '<p>Check out:</p><p><a href="https://joinmastodon.org" rel="nofollow noopener" target="_blank">joinmastodon.org</a><br>Bar</p>' + end end end |