From 3985f4bbbfd3740d955ec766fb5fb912efcb0d59 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 29 Aug 2013 10:53:21 +0200 Subject: [PATCH] Quote some more URL characters --- wrw/proto.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.11.0