Update renderers.py

This commit is contained in:
Tom Christie 2022-02-01 09:42:43 +00:00 committed by GitHub
parent f378f98a40
commit a5d741aba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ class JSONRenderer(BaseRenderer):
# We always fully escape \u2028 and \u2029 to ensure we output JSON
# that is a strict javascript subset.
# See: http://timelessrepo.com/json-isnt-a-javascript-subset
# See: https://gist.github.com/damncabbage/623b879af56f850a6ddc
ret = ret.replace('\u2028', '\\u2028').replace('\u2029', '\\u2029')
return ret.encode()