Ticket #16066: ampersands.diff
File ampersands.diff, 643 bytes (added by , 13 years ago) |
---|
-
django/utils/html.py
15 15 # List of possible strings used for bullets in bulleted lists. 16 16 DOTS = [u'·', u'*', u'\u2022', u'•', u'•', u'•'] 17 17 18 unencoded_ampersands_re = re.compile(r'&(?!(\w +|#\d+);)')18 unencoded_ampersands_re = re.compile(r'&(?!(\w{2,}|#\d+);)') 19 19 word_split_re = re.compile(r'(\s+)') 20 20 punctuation_re = re.compile('^(?P<lead>(?:%s)*)(?P<middle>.*?)(?P<trail>(?:%s)*)$' % \ 21 21 ('|'.join([re.escape(x) for x in LEADING_PUNCTUATION]),