|
@ -1746,6 +1746,7 @@ def escape_url(url): |
|
|
"""Escape URL as suggested by RFC 3986""" |
|
|
"""Escape URL as suggested by RFC 3986""" |
|
|
url_parsed = compat_urllib_parse_urlparse(url) |
|
|
url_parsed = compat_urllib_parse_urlparse(url) |
|
|
return url_parsed._replace( |
|
|
return url_parsed._replace( |
|
|
|
|
|
netloc=url_parsed.netloc.encode('idna').decode('ascii'), |
|
|
path=escape_rfc3986(url_parsed.path), |
|
|
path=escape_rfc3986(url_parsed.path), |
|
|
params=escape_rfc3986(url_parsed.params), |
|
|
params=escape_rfc3986(url_parsed.params), |
|
|
query=escape_rfc3986(url_parsed.query), |
|
|
query=escape_rfc3986(url_parsed.query), |
|
|