aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/cgi/util.rb2
-rw-r--r--test/cgi/test_cgi_util.rb2
-rw-r--r--test/erb/test_erb.rb2
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__ = {
- "'" => ''',
+ "'" => ''',
'&' => '&',
'"' => '"',
'<' => '&lt;',
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("'&\"><"),"&apos;&amp;&quot;&gt;&lt;")
+ assert_equal(CGI::escapeHTML("'&\"><"),"&#x27;&amp;&quot;&gt;&lt;")
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: &apos; should be changed to &#x27;
- assert_equal(" !&quot;\#$%&amp;&apos;()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",
+ assert_equal(" !&quot;\#$%&amp;&#x27;()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",
ERB::Util.html_escape(" !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"))
assert_equal("", ERB::Util.html_escape(""))