From 1c1dffca757b0b6acaf99d893d68847250ab4146 Mon Sep 17 00:00:00 2001 From: MattBlack85 Date: Sat, 15 Feb 2014 18:55:33 +0100 Subject: [PATCH] Fixed #21725 -- Fixed JavaScript quoting encoding. Thanks to nedbatchelder for the report. --- django/utils/text.py | 2 +- tests/utils_tests/test_text.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/django/utils/text.py b/django/utils/text.py index d277cee56b..9e0afad47b 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -343,7 +343,7 @@ def javascript_quote(s, quote_double_quotes=False): s = s.replace('alert('Hello \\xff.\n Wel𝕃come\there\r');" + output = r"