Ticket #4662: 4662.diff

File 4662.diff, 589 bytes (added by Ivan Sagalaev <Maniac@…>, 17 years ago)

Patch

  • django/utils/text.py

     
    5959        return u''
    6060    html4_singlets = ('br', 'col', 'link', 'base', 'img', 'param', 'area', 'hr', 'input')
    6161    # 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)
    6363    re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>')
    6464    # Count non-HTML words and keep note of open tags
    6565    pos = 0
Back to Top