From: Ben Darnell Date: Sun, 26 Jun 2011 02:02:55 +0000 (-0700) Subject: Accept utf8-encoded byte strings in json_encode X-Git-Tag: v2.1.0~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81dea5fb759fb15b41afcb60ea0566759716187b;p=thirdparty%2Ftornado.git Accept utf8-encoded byte strings in json_encode --- diff --git a/tornado/escape.py b/tornado/escape.py index fd686bb4d..44fe9368d 100644 --- a/tornado/escape.py +++ b/tornado/escape.py @@ -79,7 +79,7 @@ def json_encode(value): # the javscript. Some json libraries do this escaping by default, # although python's standard library does not, so we do it here. # http://stackoverflow.com/questions/1580647/json-why-are-forward-slashes-escaped - return _json_encode(value).replace("