From f7c169bcbd383c71b8b6705674114f14c18a6000 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Sun, 23 Jun 2013 20:11:51 +0200 Subject: [PATCH] boobot: URL quoting creates more problems than in solves --- contrib/boobot.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/contrib/boobot.py b/contrib/boobot.py index 726260ff..e90a69f7 100755 --- a/contrib/boobot.py +++ b/contrib/boobot.py @@ -68,12 +68,9 @@ def fixurl(url): host = host.encode('idna') colon2 = colon2.encode('utf8') port = port.encode('utf8') - path = '/'.join( # could be encoded slashes! - urllib.quote(urllib.unquote(pce).encode('utf8'), '') - for pce in parsed.path.split('/') - ) - query = urllib.quote(urllib.unquote(parsed.query).encode('utf8'), '=&?/;') - fragment = urllib.quote(urllib.unquote(parsed.fragment).encode('utf8')) + path = '/'.join(pce.encode('utf8') for pce in parsed.path.split('/')) + query = parsed.query.encode('utf8') + fragment = parsed.fragment.encode('utf8') # put it back together netloc = ''.join((user, colon1, pass_, at, host, colon2, port))