summaryrefslogtreecommitdiff
path: root/django/utils/text.py
diff options
context:
space:
mode:
authorVajrasky Kok <sky.kok@speaklikeaking.com>2014-01-04 12:57:50 +0800
committerTim Graham <timograham@gmail.com>2014-02-06 04:02:09 -0500
commitc43c469a2e4633361f5dccf7dc7ce37054008d18 (patch)
treedc7f42947f01dc290c1747a771ed2eddf8801c16 /django/utils/text.py
parentb17c75564f2f8a4a4ff63be649e7c9902c42cbf7 (diff)
Fixed #21731 -- Made javascript_quote escapes '</'.
Diffstat (limited to 'django/utils/text.py')
-rw-r--r--django/utils/text.py1
1 files changed, 1 insertions, 0 deletions
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('</', '<\\/')
if quote_double_quotes:
s = s.replace('"', '&quot;')
return str(ustring_re.sub(fix, s))