Show More
@@ -55,7 +55,7 def url_escape(path): | |||
|
55 | 55 | |
|
56 | 56 | Turns '/foo bar/' into '/foo%20bar/' |
|
57 | 57 | """ |
|
58 | parts = py3compat.unicode_to_str(path).split('/') | |
|
58 | parts = py3compat.unicode_to_str(path, encoding='utf8').split('/') | |
|
59 | 59 | return u'/'.join([quote(p) for p in parts]) |
|
60 | 60 | |
|
61 | 61 | def url_unescape(path): |
@@ -64,8 +64,8 def url_unescape(path): | |||
|
64 | 64 | Turns '/foo%20bar/' into '/foo bar/' |
|
65 | 65 | """ |
|
66 | 66 | return u'/'.join([ |
|
67 | py3compat.str_to_unicode(unquote(p)) | |
|
68 | for p in py3compat.unicode_to_str(path).split('/') | |
|
67 | py3compat.str_to_unicode(unquote(p), encoding='utf8') | |
|
68 | for p in py3compat.unicode_to_str(path, encoding='utf8').split('/') | |
|
69 | 69 | ]) |
|
70 | 70 | |
|
71 | 71 | def is_hidden(abs_path, abs_root=''): |
General Comments 0
You need to be logged in to leave comments.
Login now