Changeset 5533
- Timestamp:
- 06/25/07 08:11:10 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode/django/utils/text.py
r5314 r5533 60 60 html4_singlets = ('br', 'col', 'link', 'base', 'img', 'param', 'area', 'hr', 'input') 61 61 # Set up regular expressions 62 re_words = re.compile(r'&.*?;|<.*?>|( [A-Za-z0-9][\w-]*)')62 re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U) 63 63 re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>') 64 64 # Count non-HTML words and keep note of open tags django/branches/unicode/tests/regressiontests/defaultfilters/tests.py
r5531 r5533 105 105 u'<p>one <a href="#">two - three <br>four</a> five</p>' 106 106 107 >>> truncatewords_html(u'\xc5ngstr\xf6m was here', 1) 108 u'\xc5ngstr\xf6m ...' 109 107 110 >>> upper(u'Mixed case input') 108 111 u'MIXED CASE INPUT'
