From f0c9bc5563d8a4df657ed71229dd6ffe49dfaf94 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 12 Apr 2009 04:57:50 +0000 Subject: [1.0.X] 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. Backport of r10543 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10544 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/defaultfilters/tests.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') 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'') 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 & Jill & Jeroboam' -- cgit v1.3