diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-02-15 14:06:57 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-02-15 14:07:03 +0300 |
commit | bed60b8c47acd11569da7cf5dc5bdb545ac97784 (patch) | |
tree | 9f9e76dd1b1fec8b00a98fe2a282c82e670d7069 /spec/lib/banzai/filter/html_entity_filter_spec.rb | |
parent | 2b3313697f370d31abdda4177701ba20b66ba3e6 (diff) |
Escape HTML entities in commit messages
Diffstat (limited to 'spec/lib/banzai/filter/html_entity_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/html_entity_filter_spec.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/lib/banzai/filter/html_entity_filter_spec.rb b/spec/lib/banzai/filter/html_entity_filter_spec.rb index 91e18d876d5..43e85cbcb24 100644 --- a/spec/lib/banzai/filter/html_entity_filter_spec.rb +++ b/spec/lib/banzai/filter/html_entity_filter_spec.rb @@ -3,17 +3,12 @@ require 'spec_helper' describe Banzai::Filter::HtmlEntityFilter do include FilterSpecHelper - let(:unescaped) { 'foo <strike attr="foo">&&&</strike>' } - let(:escaped) { 'foo <strike attr="foo">&&&</strike>' } + let(:unescaped) { 'foo <strike attr="foo">&&</strike>' } + let(:escaped) { 'foo <strike attr="foo">&&amp;&</strike>' } it 'converts common entities to their HTML-escaped equivalents' do output = filter(unescaped) expect(output).to eq(escaped) end - - it 'does not double-escape' do - escaped = ERB::Util.html_escape("Merge branch 'blabla' into 'master'") - expect(filter(escaped)).to eq(escaped) - end end |