diff options
author | Benoit Daloze <[email protected]> | 2020-02-28 19:07:17 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-02-28 19:07:17 +0100 |
commit | a0f5ff4c3cd05f8717be2bf1d79f0817f288d398 (patch) | |
tree | 441f409cf816cf8a61dacdbaf204ae9f5cbe2f18 /spec/ruby/library/cgi/escapeHTML_spec.rb | |
parent | 5d210501825e1682e68cbfc2be424fc339f382fa (diff) |
Update to ruby/spec@41bf282
Diffstat (limited to 'spec/ruby/library/cgi/escapeHTML_spec.rb')
-rw-r--r-- | spec/ruby/library/cgi/escapeHTML_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/library/cgi/escapeHTML_spec.rb b/spec/ruby/library/cgi/escapeHTML_spec.rb index dcbfebe720..421aac5d4a 100644 --- a/spec/ruby/library/cgi/escapeHTML_spec.rb +++ b/spec/ruby/library/cgi/escapeHTML_spec.rb @@ -6,6 +6,10 @@ describe "CGI.escapeHTML" do CGI.escapeHTML(%[& < > " ']).should == '& < > " '' end + it "escapes invalid encoding" do + CGI.escapeHTML(%[<\xA4??>]).should == "<\xA4??>" + end + it "does not escape any other characters" do chars = " !\#$%()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" CGI.escapeHTML(chars).should == chars |