mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* 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
This commit is contained in:
parent
ba2ed2edeb
commit
c47cca2f85
3 changed files with 19 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue