Ticket #17641: 17641-1.diff

File 17641-1.diff, 649 bytes (added by Ramiro Morales, 13 years ago)
  • django/utils/htmlparser.py

    diff --git a/django/utils/htmlparser.py b/django/utils/htmlparser.py
    a b  
    11import HTMLParser as _HTMLParser
     2import re
    23
    34
    45class HTMLParser(_HTMLParser.HTMLParser):
     
    1112        self.cdata_tag = None
    1213
    1314    def set_cdata_mode(self, tag):
    14         self.interesting = _HTMLParser.interesting_cdata
     15        try:
     16            self.interesting = _HTMLParser.interesting_cdata
     17        except AttributeError:
     18            self.interesting = re.compile(r'</\s*%s\s*>' % tag.lower(), re.I)
    1519        self.cdata_tag = tag.lower()
    1620
    1721    def clear_cdata_mode(self):
Back to Top