X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fproto.py;h=96a88781ba5e7eda8267ae100ad17fc41e5e65f9;hb=babf3e21cb06bf867e3ec98003d4a077090b8839;hp=0a6a43022004d8d45e7911fc9355d4b120840604;hpb=2a5a8ce70a0107b7bfd5bd3459ae4aae3a7558e2;p=wrw.git diff --git a/wrw/proto.py b/wrw/proto.py index 0a6a430..96a8878 100644 --- a/wrw/proto.py +++ b/wrw/proto.py @@ -104,8 +104,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