1 | Index: django/template/defaultfilters.py
|
---|
2 | ===================================================================
|
---|
3 | --- django/template/defaultfilters.py (revision 10445)
|
---|
4 | +++ django/template/defaultfilters.py (working copy)
|
---|
5 | @@ -76,7 +76,9 @@
|
---|
6 | ('&', r'\x26'),
|
---|
7 | ('=', r'\x3D'),
|
---|
8 | ('-', r'\x2D'),
|
---|
9 | - (';', r'\x3B')
|
---|
10 | + (';', r'\x3B'),
|
---|
11 | + (u'\u2028', ''),
|
---|
12 | + (u'\u2029', '')
|
---|
13 | )
|
---|
14 |
|
---|
15 | # Escape every ASCII character with a value less than 32.
|
---|
16 | Index: tests/regressiontests/defaultfilters/tests.py
|
---|
17 | ===================================================================
|
---|
18 | --- tests/regressiontests/defaultfilters/tests.py (revision 10445)
|
---|
19 | +++ tests/regressiontests/defaultfilters/tests.py (working copy)
|
---|
20 | @@ -83,6 +83,9 @@
|
---|
21 | >>> escapejs(ur'<script>and this</script>')
|
---|
22 | u'\\x3Cscript\\x3Eand this\\x3C/script\\x3E'
|
---|
23 |
|
---|
24 | +>>> escapejs('paragraph separator:
|
---|
25 | and line separator:
|
---|
26 | ')
|
---|
27 | +u'paragraph separator: and line separator: '
|
---|
28 | +
|
---|
29 | >>> fix_ampersands(u'Jack & Jill & Jeroboam')
|
---|
30 | u'Jack & Jill & Jeroboam'
|
---|
31 |
|
---|