From 81dea5fb759fb15b41afcb60ea0566759716187b Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 25 Jun 2011 19:02:55 -0700 Subject: [PATCH] Accept utf8-encoded byte strings in json_encode --- tornado/escape.py | 2 +- tornado/test/escape_test.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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("