From: Fredrik Tolf Date: Sun, 19 Mar 2017 17:15:03 +0000 (+0100) Subject: Properly quote percent-signs in URLs. X-Git-Url: http://dolda2000.com/gitweb/?p=wrw.git;a=commitdiff_plain;h=69eb6cbefcf769276e3e15c6f20e9d5af74fd326;ds=sidebyside Properly quote percent-signs in URLs. --- diff --git a/wrw/proto.py b/wrw/proto.py index 8174f9e..482a23e 100644 --- a/wrw/proto.py +++ b/wrw/proto.py @@ -106,7 +106,7 @@ def urlq(url): if isinstance(url, str): url = url.encode("utf-8") ret = "" - invalid = b";&=#?/\"'" + invalid = b"%;&=#?/\"'" for c in url: if c in invalid or (c <= 32) or (c >= 128): ret += "%%%02X" % c