ignore malformed markup errors
This commit is contained in:
parent
d7097d433c
commit
eba6a9f27c
1 changed files with 5 additions and 1 deletions
|
@ -120,7 +120,11 @@ class HtmlDjangoParser(TokenParser):
|
|||
|
||||
def _process_tag(self, token, content):
|
||||
if content.startswith('</') or content.startswith('/'):
|
||||
self.tags.pop(0)
|
||||
try:
|
||||
self.tags.pop(0)
|
||||
except IndexError:
|
||||
# ignore errors from malformed markup
|
||||
pass
|
||||
self.getting_attrs = False
|
||||
elif content.startswith('<'):
|
||||
self.tags.insert(0, content.replace('<', '', 1).strip().lower())
|
||||
|
|
Loading…
Reference in a new issue