mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 09:04:00 -05:00
Add support for “start” and “reversed” attributes to ol element
Fixes #1367
This commit is contained in:
parent
814d3f343f
commit
f186e0c91c
@ -90,6 +90,7 @@ class Sanitize
|
|||||||
'span' => %w(class),
|
'span' => %w(class),
|
||||||
'abbr' => %w(title),
|
'abbr' => %w(title),
|
||||||
'blockquote' => %w(cite),
|
'blockquote' => %w(cite),
|
||||||
|
'ol' => %w(start reversed),
|
||||||
},
|
},
|
||||||
|
|
||||||
add_attributes: {
|
add_attributes: {
|
||||||
|
@ -13,6 +13,10 @@ describe Sanitize::Config 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>'
|
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
|
end
|
||||||
|
|
||||||
|
it 'keeps start and reversed attributes of ol' do
|
||||||
|
expect(Sanitize.fragment('<p>Check out:</p><ol start="3" reversed=""><li>Foo</li><li>Bar</li></ol>', subject)).to eq '<p>Check out:</p><ol start="3" reversed=""><li>Foo</li><li>Bar</li></ol>'
|
||||||
|
end
|
||||||
|
|
||||||
it 'removes a without href' do
|
it 'removes a without href' do
|
||||||
expect(Sanitize.fragment('<a>Test</a>', subject)).to eq 'Test'
|
expect(Sanitize.fragment('<a>Test</a>', subject)).to eq 'Test'
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user