mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
SF patch# 1762940 by Joe Gregorio.
Fix test_cookielib and test_urllib2. (The changes to urllib make urllib.quote() work correctly for Unicode strings; but they don't fix test_urllib.)
This commit is contained in:
parent
15863ea07a
commit
c0f2d2d345
4 changed files with 24 additions and 14 deletions
|
@ -644,8 +644,6 @@ def escape_path(path):
|
|||
# And here, kind of: draft-fielding-uri-rfc2396bis-03
|
||||
# (And in draft IRI specification: draft-duerst-iri-05)
|
||||
# (And here, for new URI schemes: RFC 2718)
|
||||
if isinstance(path, str):
|
||||
path = path.encode("utf-8")
|
||||
path = urllib.quote(path, HTTP_PATH_SAFE)
|
||||
path = ESCAPED_CHAR_RE.sub(uppercase_escaped_char, path)
|
||||
return path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue