From c47cca2f858f2665a6424e417745a9fd7e78003c Mon Sep 17 00:00:00 2001 From: xibbar Date: Tue, 17 Jul 2012 23:04:46 +0000 Subject: Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA * 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 --- test/cgi/test_cgi_util.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/cgi/test_cgi_util.rb') 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("\n\t\n\t\n\n",CGI::pretty("","\t")) end + def test_cgi_escapeHTML + assert_equal(CGI::escapeHTML("'&\"><"),"'&"><") + end + + def test_cgi_unescapeHTML + assert_equal(CGI::unescapeHTML("'&"><"),"'&\"><") + end + end -- cgit v1.2.3