diff --git a/.pytest.expect b/.pytest.expect index 04eb436e..aafc485c 100644 --- a/.pytest.expect +++ b/.pytest.expect @@ -1321,14 +1321,6 @@ u'html5lib/tests/testdata/tree-construction/tests26.dat::19::cElementTree::parse u'html5lib/tests/testdata/tree-construction/tests26.dat::19::cElementTree::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/tests26.dat::19::lxml::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/tests26.dat::19::lxml::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::DOM::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::DOM::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::ElementTree::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::ElementTree::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::cElementTree::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::cElementTree::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::lxml::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/tests8.dat::5::lxml::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/webkit02.dat::14::DOM::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/webkit02.dat::14::DOM::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/webkit02.dat::14::ElementTree::parser::namespaced': FAIL diff --git a/html5lib/html5parser.py b/html5lib/html5parser.py index 74d829d9..3ccd8561 100644 --- a/html5lib/html5parser.py +++ b/html5lib/html5parser.py @@ -1068,7 +1068,7 @@ def startTagListItem(self, token): stopNames = stopNamesMap[token["name"]] for node in reversed(self.tree.openElements): if node.name in stopNames: - self.parser.phase.processEndTag( + self.parser.phases["inBody"].processEndTag( impliedTagToken(node.name, "EndTag")) break if (node.nameTuple in specialElements and @@ -1076,7 +1076,7 @@ def startTagListItem(self, token): break if self.tree.elementInScope("p", variant="button"): - self.parser.phase.processEndTag( + self.parser.phases["inBody"].processEndTag( impliedTagToken("p", "EndTag")) self.tree.insertElement(token)