diff options
author | xibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-17 23:04:46 +0000 |
---|---|---|
committer | xibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-17 23:04:46 +0000 |
commit | c47cca2f858f2665a6424e417745a9fd7e78003c (patch) | |
tree | a98e14e74e805734e48a0645e7855f49766b59f0 /test/cgi/test_cgi_util.rb | |
parent | ba2ed2edebb1d86bc23e84a1f5168cf3fba94f84 (diff) |
Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <[email protected]>
* lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add ' for HTML5 escaping.
[Feature #6620]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_util.rb')
-rw-r--r-- | test/cgi/test_cgi_util.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cgi/test_cgi_util.rb b/test/cgi/test_cgi_util.rb index a291d47f99..a36af776c5 100644 --- a/test/cgi/test_cgi_util.rb +++ b/test/cgi/test_cgi_util.rb @@ -53,4 +53,12 @@ class CGIUtilTest < Test::Unit::TestCase assert_equal("<HTML>\n\t<BODY>\n\t</BODY>\n</HTML>\n",CGI::pretty("<HTML><BODY></BODY></HTML>","\t")) end + def test_cgi_escapeHTML + assert_equal(CGI::escapeHTML("'&\"><"),"'&"><") + end + + def test_cgi_unescapeHTML + assert_equal(CGI::unescapeHTML("'&"><"),"'&\"><") + end + end |