Ticket #10675: 10675.diff

File 10675.diff, 1007 bytes (added by Rich Leland, 16 years ago)
Line 
1Index: 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.
16Index: 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: 

25and line separator: 

26')
27+u'paragraph separator: and line separator: '
28+
29 >>> fix_ampersands(u'Jack & Jill & Jeroboam')
30 u'Jack &amp; Jill &amp; Jeroboam'
31
Back to Top