summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-04-12 04:55:41 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-04-12 04:55:41 +0000
commit8931d8d68872f3b0742dafe02f4ab39d610c82e3 (patch)
treeb137c1c7ef97f45991dab1adb74fb6067f8e1305 /tests
parent499a8ac3317aa67d3bd5f84fd668304b6adcdc30 (diff)
Fixed #10675 -- Added unicode paragraph and line-sep handling to escapejs.
There were a couple of line breaking Unicode characters (\u2028 and \u2029) that cause Javascript errors, at least in Firefox, if not escaped. So now we do so. Based on a patch from rleland. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/defaultfilters/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py
index 027fcbba7d..4343586c48 100644
--- a/tests/regressiontests/defaultfilters/tests.py
+++ b/tests/regressiontests/defaultfilters/tests.py
@@ -83,6 +83,9 @@ u'and lots of whitespace: \\x0D\\x0A\\x09\\x0B\\x0C\\x08'
>>> escapejs(ur'<script>and this</script>')
u'\\x3Cscript\\x3Eand this\\x3C/script\\x3E'
+>>> escapejs(u'paragraph separator:\u2029and line separator:\u2028')
+u'paragraph separator:\\u2029and line separator:\\u2028'
+
>>> fix_ampersands(u'Jack & Jill & Jeroboam')
u'Jack &amp; Jill &amp; Jeroboam'