From: Fredrik Tolf Date: Thu, 29 Aug 2013 08:53:21 +0000 (+0200) Subject: Quote some more URL characters X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=3985f4bbbfd3740d955ec766fb5fb912efcb0d59;p=wrw.git Quote some more URL characters --- diff --git a/wrw/proto.py b/wrw/proto.py index 4cf1951..8c8dcee 100644 --- a/wrw/proto.py +++ b/wrw/proto.py @@ -103,8 +103,9 @@ def simpleerror(env, startreq, code, title, msg): def urlq(url): ret = "" + invalid = "&=#?/\"'" for c in url: - if c == "&" or c == "=" or c == "#" or c == "?" or c == "/" or (ord(c) <= 32): + if c in invalid or (ord(c) <= 32): ret += "%%%02X" % ord(c) else: ret += c