diff options
author | Guido van Rossum <guido@python.org> | 1999-03-12 14:31:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-03-12 14:31:10 (GMT) |
commit | 367ac80d3ba72223865003cb24d4ff5abea8400c (patch) | |
tree | 29266f148cd691d70a4de5fd6137c8aa9db8b859 /Lib/urllib.py | |
parent | f61bbc818223a3adc83775f7c176872b436a49e1 (diff) | |
download | cpython-367ac80d3ba72223865003cb24d4ff5abea8400c.zip cpython-367ac80d3ba72223865003cb24d4ff5abea8400c.tar.gz cpython-367ac80d3ba72223865003cb24d4ff5abea8400c.tar.bz2 |
From: Sjoerd Mullender
The filename to URL conversion didn't properly quote special
characters.
The URL to filename didn't properly unquote special chatacters.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index ceacc61..a484736 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -38,16 +38,9 @@ elif os.name == 'nt': from nturl2path import url2pathname, pathname2url else: def url2pathname(pathname): - return pathname + return unquote(pathname) def pathname2url(pathname): - return pathname - -_url2pathname = url2pathname -def url2pathname(url): - return _url2pathname(unquote(url)) -_pathname2url = pathname2url -def pathname2url(p): - return quote(_pathname2url(p)) + return quote(pathname) # This really consists of two pieces: # (1) a class which handles opening of all sorts of URLs |