diff options
author | James <git@jamedjo.co.uk> | 2016-09-28 14:46:11 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-03-06 19:27:49 +0300 |
commit | 00f5cb84d55036542165c756e235619631bc7dee (patch) | |
tree | d2124a1ebb272019ed44351363eed0d9d06c971e /spec/lib/banzai/filter/sanitization_filter_spec.rb | |
parent | 0a58a8c8258d26e7f5c782ca1cce8665d230fa83 (diff) |
SanitizationFilter allows html5 details and summary (Issue #21605)
Also adds details/summary tags to Copy-as-GFM
Diffstat (limited to 'spec/lib/banzai/filter/sanitization_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/sanitization_filter_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/sanitization_filter_spec.rb b/spec/lib/banzai/filter/sanitization_filter_spec.rb index b38e3b17e64..b4cd5f63a15 100644 --- a/spec/lib/banzai/filter/sanitization_filter_spec.rb +++ b/spec/lib/banzai/filter/sanitization_filter_spec.rb @@ -86,6 +86,16 @@ describe Banzai::Filter::SanitizationFilter, lib: true do expect(filter(act).to_html).to eq exp end + it 'allows `summary` elements' do + exp = act = '<summary>summary line</summary>' + expect(filter(act).to_html).to eq exp + end + + it 'allows `details` elements' do + exp = act = '<details>long text goes here</details>' + expect(filter(act).to_html).to eq exp + end + it 'removes `rel` attribute from `a` elements' do act = %q{<a href="#" rel="nofollow">Link</a>} exp = %q{<a href="#">Link</a>} |