diff options
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 |