]> git.dolda2000.com Git - wrw.git/commitdiff
Properly quote percent-signs in URLs.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 19 Mar 2017 17:15:03 +0000 (18:15 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 19 Mar 2017 17:15:14 +0000 (18:15 +0100)
wrw/proto.py

index 8174f9ef3ef417a09947f67f6f6b843f274167ea..482a23ead18d2bef26a415ab22a990ae1680f46d 100644 (file)
@@ -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