diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb index dfd8b9f9174..8b57b0f7232 100644 --- a/app/lib/sanitize_config.rb +++ b/app/lib/sanitize_config.rb @@ -90,6 +90,7 @@ class Sanitize 'span' => %w(class), 'abbr' => %w(title), 'blockquote' => %w(cite), + 'ol' => %w(start reversed), }, add_attributes: { diff --git a/spec/lib/sanitize_config_spec.rb b/spec/lib/sanitize_config_spec.rb index 28a548c494e..da24f67d61e 100644 --- a/spec/lib/sanitize_config_spec.rb +++ b/spec/lib/sanitize_config_spec.rb @@ -13,6 +13,10 @@ describe Sanitize::Config do expect(Sanitize.fragment('

Check out:

', subject)).to eq '

Check out:

' end + it 'keeps start and reversed attributes of ol' do + expect(Sanitize.fragment('

Check out:

  1. Foo
  2. Bar
', subject)).to eq '

Check out:

  1. Foo
  2. Bar
' + end + it 'removes a without href' do expect(Sanitize.fragment('Test', subject)).to eq 'Test' end