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:
199cdc4
)
Converted URL quoting to Python3.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 18 Sep 2013 04:41:38 +0000
(06:41 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 18 Sep 2013 04:41:38 +0000
(06:41 +0200)
wrw/proto.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/proto.py
b/wrw/proto.py
index
0e49379
..
cc2edb8
100644
(file)
--- a/
wrw/proto.py
+++ b/
wrw/proto.py
@@
-103,15
+103,15
@@
def simpleerror(env, startreq, code, title, msg):
return [buf]
def urlq(url):
- if isinstance(url,
unicode
):
+ if isinstance(url,
str
):
url = url.encode("utf-8")
ret = ""
- invalid = "&=#?/\"'"
+ invalid =
b
"&=#?/\"'"
for c in url:
- if c in invalid or (
ord(c) <= 32) or (ord(c)
>= 128):
- ret += "%%%02X" %
ord(c)
+ if c in invalid or (
c <= 32) or (c
>= 128):
+ ret += "%%%02X" %
c
else:
- ret += c
+ ret += c
hr(c)
return ret
class urlerror(ValueError):