- Notifications
You must be signed in to change notification settings - Fork294
Open
Description
http://code.google.com/p/html5lib/issues/detail?id=176
Reported by eric.promislow, Feb 23, 2011
For this standalone code (Python 2.6, html5lib 0.90):
import cStringIO, html5lib, pprint
text="""<!DOCTYPE html>Here's a table<table><caption>Stuff goes here</bogus><tr><td>col</td><td>another</td></tr></table>"""inputStream=cStringIO.StringIO(text)parser=html5lib.HTMLParser()doc=parser.parse(inputStream)errors=parser.errorspprint.pprint(errors)I get this output:
[((5, 32), 'unexpected-end-tag', {'name': u'bogus'}), ((6, 4), 'XXX-undefined-error', {})]
Quick first look at the code, I would say that end-tags that aren't
in self.tree.openElements should be popped as part of error-recovery,
but then, I just started working with this project a few hours ago...