Django

Code

Ticket #4662: 4662.diff

File 4662.diff, 0.6 kB (added by Ivan Sagalaev <Maniac@SoftwareManiacs.Org>, 1 year ago)

Patch

  • django/utils/text.py

    old new  
    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