Ticket #10931: utils_text-r10637.patch

File utils_text-r10637.patch, 683 bytes (added by George Song, 16 years ago)

Handle mutli-line tags

  • django/utils/text.py

     
    6161        return u''
    6262    html4_singlets = ('br', 'col', 'link', 'base', 'img', 'param', 'area', 'hr', 'input')
    6363    # Set up regular expressions
    64     re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U)
    65     re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>')
     64    re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U|re.S)
     65    re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>', re.S)
    6666    # Count non-HTML words and keep note of open tags
    6767    pos = 0
    6868    ellipsis_pos = 0
Back to Top