diff --git a/django/utils/text.py b/django/utils/text.py index f52050cccc..c2da31a554 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -327,6 +327,7 @@ def javascript_quote(s, quote_double_quotes=False): s = s.replace('\n', '\\n') s = s.replace('\t', '\\t') s = s.replace("'", "\\'") + s = s.replace('alert('Hello \\xff.\n Welcome\there\r');" + output = r"