ruby-changes:28263
From: nagachika <ko1@a...>
Date: Tue, 16 Apr 2013 01:35:05 +0900 (JST)
Subject: [ruby-changes:28263] nagachika:r40315 (ruby_2_0_0): merge revision(s) 40181: [Backport #8183]
nagachika 2013-04-16 01:34:55 +0900 (Tue, 16 Apr 2013) New Revision: 40315 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40315 Log: merge revision(s) 40181: [Backport #8183] * lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character. [Bug #8183] Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/lib/cgi/util.rb branches/ruby_2_0_0/test/cgi/test_cgi_util.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/lib/cgi/util.rb =================================================================== --- ruby_2_0_0/lib/cgi/util.rb (revision 40314) +++ ruby_2_0_0/lib/cgi/util.rb (revision 40315) @@ -55,7 +55,7 @@ class CGI https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/cgi/util.rb#L55 end end asciicompat = Encoding.compatible?(string, "a") - string.gsub(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#x[0-9A-Fa-f]+);/) do + string.gsub(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#[xX][0-9A-Fa-f]+);/) do match = $1.dup case match when 'apos' then "'" Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 40314) +++ ruby_2_0_0/version.h (revision 40315) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-04-16" -#define RUBY_PATCHLEVEL 140 +#define RUBY_PATCHLEVEL 141 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 4 Index: ruby_2_0_0/test/cgi/test_cgi_util.rb =================================================================== --- ruby_2_0_0/test/cgi/test_cgi_util.rb (revision 40314) +++ ruby_2_0_0/test/cgi/test_cgi_util.rb (revision 40315) @@ -61,4 +61,8 @@ class CGIUtilTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/cgi/test_cgi_util.rb#L61 assert_equal(CGI::unescapeHTML("'&"><"),"'&\"><") end + def test_cgi_unescapeHTML_uppercasecharacter + assert_equal(CGI::unescapeHTML("あいう"),"\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86") + end + end Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r40181 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/