Skip to content
Myr

Only escape backslashes if they follow "<" in JSON dumping for

Before adoption: this commit came in with the history the project adopted, so no landing records it.

templates.

authored by Armin Ronacher · committed by Armin Ronacher · parent 95750b3 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask.py+1 added-1 removed
259 unmodified lines
260261262def _tojson_filter(string, *args, **kwargs):263 """Calls dumps for the template engine, escaping Slashes properly."""264 return json.dumps(string, *args, **kwargs).replace('/', '\\/')264 return json.dumps(string, *args, **kwargs).replace('</', '<\\/')265266267class Flask(object):268 """The flask object implements a WSGI application and acts as the central
519 unmodified lines