Ticket #4662: 4662.diff
| File 4662.diff, 0.6 kB (added by Ivan Sagalaev <Maniac@SoftwareManiacs.Org>, 1 year ago) |
|---|
-
django/utils/text.py
old new 59 59 return u'' 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 65 65 pos = 0
