mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) 40181: [Backport #8183]
* lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character. [Bug #8183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3dbba340e
commit
3a645975f5
3 changed files with 6 additions and 2 deletions
|
@ -55,7 +55,7 @@ class CGI
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
asciicompat = Encoding.compatible?(string, "a")
|
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
|
match = $1.dup
|
||||||
case match
|
case match
|
||||||
when 'apos' then "'"
|
when 'apos' then "'"
|
||||||
|
|
|
@ -61,4 +61,8 @@ class CGIUtilTest < Test::Unit::TestCase
|
||||||
assert_equal(CGI::unescapeHTML("'&"><"),"'&\"><")
|
assert_equal(CGI::unescapeHTML("'&"><"),"'&\"><")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_cgi_unescapeHTML_uppercasecharacter
|
||||||
|
assert_equal(CGI::unescapeHTML("あいう"),"\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define RUBY_VERSION "2.0.0"
|
#define RUBY_VERSION "2.0.0"
|
||||||
#define RUBY_RELEASE_DATE "2013-04-16"
|
#define RUBY_RELEASE_DATE "2013-04-16"
|
||||||
#define RUBY_PATCHLEVEL 140
|
#define RUBY_PATCHLEVEL 141
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2013
|
#define RUBY_RELEASE_YEAR 2013
|
||||||
#define RUBY_RELEASE_MONTH 4
|
#define RUBY_RELEASE_MONTH 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue