summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-19 03:28:15 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-19 03:28:15 (GMT)
commite27a7b80748c902ce956287f14857666db523c4b (patch)
treefd3479792cba0c7942a5a4a996bf1f05e0f00da1 /Lib/urllib.py
parente1bb5f9814a9dffbc05c5c5a24fe15082a8b3e04 (diff)
downloadcpython-e27a7b80748c902ce956287f14857666db523c4b.zip
cpython-e27a7b80748c902ce956287f14857666db523c4b.tar.gz
cpython-e27a7b80748c902ce956287f14857666db523c4b.tar.bz2
Anonymous SF bug 129288: "The python 2.0 urllib has %%%x as a format
when quoting forbidden characters. There are scripts out there that break with lower case, therefore I guess %%%X should be used." I agree, so am fixing this.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index cd22766..61fac28 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -1049,7 +1049,7 @@ def _fast_quote(s):
for i in range(len(res)):
c = res[i]
if not _fast_safe.has_key(c):
- res[i] = '%%%02x' % ord(c)
+ res[i] = '%%%02X' % ord(c)
return ''.join(res)
def quote(s, safe = '/'):
@@ -1080,7 +1080,7 @@ def quote(s, safe = '/'):
for i in range(len(res)):
c = res[i]
if c not in safe:
- res[i] = '%%%02x' % ord(c)
+ res[i] = '%%%02X' % ord(c)
return ''.join(res)
def quote_plus(s, safe = ''):