From 06ec917ddedc618944670b39ccd5f4cb862882b2 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 19 Apr 2010 23:54:38 +0200 Subject: [PATCH] Only escape backslashes if they follow "<" in JSON dumping for templates. --- flask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask.py b/flask.py index 055b46cf..89a4fee5 100644 --- a/flask.py +++ b/flask.py @@ -261,7 +261,7 @@ def _get_package_path(name): def _tojson_filter(string, *args, **kwargs): """Calls dumps for the template engine, escaping Slashes properly.""" - return json.dumps(string, *args, **kwargs).replace('/', '\\/') + return json.dumps(string, *args, **kwargs).replace('