Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit accaf0b

Browse files
committed
minor refactoring
1 parent 0f5768c commit accaf0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/core/convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ def urlencode(string, safe=":/?%&=", convall=False):
9595
return result
9696

9797
if convall:
98-
result = urllib.quote(string.encode("utf-8")) #Reference: http://old.nabble.com/Re:-Problem:-neither-urllib2.quote-nor-urllib.quote-encode-the--unicode-strings-arguments-p19823144.html
98+
result = urllib.quote(utf8encode(string)) #Reference: http://old.nabble.com/Re:-Problem:-neither-urllib2.quote-nor-urllib.quote-encode-the--unicode-strings-arguments-p19823144.html
9999
else:
100-
result = urllib.quote(string.encode("utf-8"), safe)
100+
result = urllib.quote(utf8encode(string), safe)
101101

102102
return result
103103

0 commit comments

Comments
 (0)