In Django, you would write something like this: window.location = ' { { url|escapejs }}'; Also, if this is inline javascript—in an HTML document, not a separate .js file—then you still shouldn’t escape the ampersand, which means the document will not validate as XHTML.
return _default_decoder.decode(s) File '/usr/lib/python3.5/json/decoder.py', line 342, in decode raise JSONDecodeError('Extra data', s, end) json.decoder.
Decoded results:
2021-02-16