Only escape backslashes if they follow "<" in JSON dumping for
templates.
This commit is contained in:
parent
95750b3287
commit
06ec917dde
1 changed files with 1 additions and 1 deletions
2
flask.py
2
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('</', '<\\/')
|
||||
|
||||
|
||||
class Flask(object):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue