diff --git a/django/utils/htmlparser.py b/django/utils/htmlparser.py
a
|
b
|
|
1 | 1 | import HTMLParser as _HTMLParser |
| 2 | import re |
2 | 3 | |
3 | 4 | |
4 | 5 | class HTMLParser(_HTMLParser.HTMLParser): |
… |
… |
|
11 | 12 | self.cdata_tag = None |
12 | 13 | |
13 | 14 | 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) |
15 | 19 | self.cdata_tag = tag.lower() |
16 | 20 | |
17 | 21 | def clear_cdata_mode(self): |