Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bb05fa
)
Fixed up URL quoting a bit.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 18 Sep 2013 04:38:14 +0000
(06:38 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 18 Sep 2013 04:38:14 +0000
(06:38 +0200)
wrw/proto.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/proto.py
b/wrw/proto.py
index
8c8dcee
..
1af091f
100644
(file)
--- a/
wrw/proto.py
+++ b/
wrw/proto.py
@@
-102,10
+102,12
@@
def simpleerror(env, startreq, code, title, msg):
return [buf]
def urlq(url):
+ if isinstance(url, unicode):
+ url = url.encode("utf-8")
ret = ""
invalid = "&=#?/\"'"
for c in url:
- if c in invalid or (ord(c) <= 32):
+ if c in invalid or (ord(c) <= 32)
or (ord(c) >= 128)
:
ret += "%%%02X" % ord(c)
else:
ret += c