diff options
-rw-r--r-- | lib/cgi/util.rb | 2 | ||||
-rw-r--r-- | test/cgi/test_cgi_util.rb | 2 | ||||
-rw-r--r-- | test/erb/test_erb.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb index 9cfff99b78..a2bd066fe2 100644 --- a/lib/cgi/util.rb +++ b/lib/cgi/util.rb @@ -22,7 +22,7 @@ class CGI # The set of special characters and their escaped values TABLE_FOR_ESCAPE_HTML__ = { - "'" => ''', + "'" => ''', '&' => '&', '"' => '"', '<' => '<', diff --git a/test/cgi/test_cgi_util.rb b/test/cgi/test_cgi_util.rb index a36af776c5..5bf5b79988 100644 --- a/test/cgi/test_cgi_util.rb +++ b/test/cgi/test_cgi_util.rb @@ -54,7 +54,7 @@ class CGIUtilTest < Test::Unit::TestCase end def test_cgi_escapeHTML - assert_equal(CGI::escapeHTML("'&\"><"),"'&"><") + assert_equal(CGI::escapeHTML("'&\"><"),"'&"><") end def test_cgi_unescapeHTML diff --git a/test/erb/test_erb.rb b/test/erb/test_erb.rb index 66576d98ea..e609d47876 100644 --- a/test/erb/test_erb.rb +++ b/test/erb/test_erb.rb @@ -40,7 +40,7 @@ class TestERB < Test::Unit::TestCase def test_html_escape # TODO: ' should be changed to ' - assert_equal(" !"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", + assert_equal(" !"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", ERB::Util.html_escape(" !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")) assert_equal("", ERB::Util.html_escape("")) |