mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix error if the input is mixed Unicode and percent-escapes
Reported by kivikakk (Ashe Connor) with tests and doc fix Patch based on mame and fix by naruse [Bug #14586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a2fb188e3
commit
6db869c101
2 changed files with 10 additions and 3 deletions
|
@ -45,4 +45,11 @@ class URI::TestParser < Test::Unit::TestCase
|
|||
URI.parse(1)
|
||||
end
|
||||
end
|
||||
|
||||
def test_unescape
|
||||
p1 = URI::Parser.new
|
||||
assert_equal("\xe3\x83\x90", p1.unescape("\xe3\x83\x90"))
|
||||
assert_equal("\xe3\x83\x90", p1.unescape('%e3%83%90'))
|
||||
assert_equal("\xe3\x83\x90\xe3\x83\x90", p1.unescape("\xe3\x83\x90%e3%83%90"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue