Corrected version of 1.170
This commit is contained in:
parent
2bdec7bfb0
commit
cf6b6326e5
|
@ -1110,11 +1110,8 @@ def quote(s, safe = '/'):
|
|||
def quote_plus(s, safe = ''):
|
||||
"""Quote the query fragment of a URL; replacing ' ' with '+'"""
|
||||
if ' ' in s:
|
||||
l = s.split(' ')
|
||||
for i in range(len(l)):
|
||||
l[i] = quote(l[i], safe)
|
||||
return '+'.join(l)
|
||||
else:
|
||||
s = quote(s, safe + ' ')
|
||||
return s.replace(' ', '+')
|
||||
return quote(s, safe)
|
||||
|
||||
def urlencode(query,doseq=0):
|
||||
|
|
Loading…
Reference in New Issue