No need to encode params. fix #311
This commit is contained in:
@@ -26,7 +26,7 @@ def getParams():
|
|||||||
|
|
||||||
for item in nested:
|
for item in nested:
|
||||||
if item is nested[-1]:
|
if item is nested[-1]:
|
||||||
current[item] = toUnicode(unquote(value)).encode('utf-8')
|
current[item] = toUnicode(unquote(value))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
current[item]
|
current[item]
|
||||||
@@ -35,7 +35,7 @@ def getParams():
|
|||||||
|
|
||||||
current = current[item]
|
current = current[item]
|
||||||
else:
|
else:
|
||||||
temp[param] = toUnicode(unquote(value)).encode('utf-8')
|
temp[param] = toUnicode(unquote(value))
|
||||||
|
|
||||||
return dictToList(temp)
|
return dictToList(temp)
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ def dictToList(params):
|
|||||||
|
|
||||||
def getParam(attr, default = None):
|
def getParam(attr, default = None):
|
||||||
try:
|
try:
|
||||||
return toUnicode(unquote(getattr(flask.request, 'args').get(attr, default))).encode('utf-8')
|
return toUnicode(unquote(getattr(flask.request, 'args').get(attr, default)))
|
||||||
except:
|
except:
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user