misc: load json as text (#36515)

This commit is contained in:
Frédéric Péters 2019-11-15 11:39:25 +01:00
parent c3057f76bd
commit 7523343893
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ def json_encode_helper(d, charset):
def json_loads(value, charset=None):
if six.PY3:
return json.loads(value)
return json.loads(force_text(value))
charset = (get_publisher() and get_publisher().site_charset) or 'utf-8'
return json_encode_helper(json.loads(value), charset)