From e45339a0b8a375423743edb050f36e9a7bbb7cc1 Mon Sep 17 00:00:00 2001 From: Geoffrey Sneddon Date: Sun, 29 May 2016 04:58:47 +0100 Subject: [PATCH 1/2] Fix #258: annotation-xml branch didn't check tag type --- html5lib/html5parser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/html5lib/html5parser.py b/html5lib/html5parser.py index 3daf2995..224341b7 100644 --- a/html5lib/html5parser.py +++ b/html5lib/html5parser.py @@ -193,6 +193,7 @@ def mainLoop(self): type in (CharactersToken, SpaceCharactersToken))) or (currentNodeNamespace == namespaces["mathml"] and currentNodeName == "annotation-xml" and + type == StartTagToken and token["name"] == "svg") or (self.isHTMLIntegrationPoint(currentNode) and type in (StartTagToken, CharactersToken, SpaceCharactersToken))): From f3f00e48c4baf859dfaf4bc90d3e90debf024194 Mon Sep 17 00:00:00 2001 From: Geoffrey Sneddon Date: Wed, 6 Jul 2016 19:23:28 +0100 Subject: [PATCH 2/2] Update tests to tip of html5lib-tests --- .pytest.expect | 40 ++++++++++++++++++++++++++++++++-------- html5lib/tests/testdata | 2 +- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.pytest.expect b/.pytest.expect index 2effc347..0fa326f0 100644 --- a/.pytest.expect +++ b/.pytest.expect @@ -16,6 +16,14 @@ u'html5lib/tests/testdata/tokenizer/test3.test::244::dataState': FAIL u'html5lib/tests/testdata/tokenizer/test3.test::246::dataState': FAIL u'html5lib/tests/testdata/tokenizer/test3.test::258::dataState': FAIL u'html5lib/tests/testdata/tokenizer/test3.test::656::dataState': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::DOM::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::DOM::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::ElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::ElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::cElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::cElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::lxml::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/adoption01.dat::17::lxml::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/foreign-fragment.dat::0::DOM::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/foreign-fragment.dat::0::DOM::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/foreign-fragment.dat::0::ElementTree::parser::namespaced': FAIL @@ -232,14 +240,6 @@ u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::5::cElementTre u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::5::cElementTree::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::5::lxml::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::5::lxml::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::DOM::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::DOM::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::ElementTree::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::ElementTree::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::cElementTree::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::cElementTree::parser::void-namespace': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::lxml::parser::namespaced': FAIL -u'html5lib/tests/testdata/tree-construction/menuitem-element.dat::9::lxml::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/namespace-sensitivity.dat::0::DOM::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/namespace-sensitivity.dat::0::DOM::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/namespace-sensitivity.dat::0::ElementTree::parser::namespaced': FAIL @@ -1224,6 +1224,30 @@ u'html5lib/tests/testdata/tree-construction/tests11.dat::2::cElementTree::parser u'html5lib/tests/testdata/tree-construction/tests11.dat::2::cElementTree::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/tests11.dat::2::lxml::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/tests11.dat::2::lxml::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::DOM::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::DOM::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::ElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::ElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::cElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::cElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::lxml::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::4::lxml::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::DOM::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::DOM::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::ElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::ElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::cElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::cElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::lxml::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::5::lxml::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::DOM::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::DOM::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::ElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::ElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::cElementTree::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::cElementTree::parser::void-namespace': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::lxml::parser::namespaced': FAIL +u'html5lib/tests/testdata/tree-construction/tests11.dat::6::lxml::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/tests19.dat::14::DOM::parser::namespaced': FAIL u'html5lib/tests/testdata/tree-construction/tests19.dat::14::DOM::parser::void-namespace': FAIL u'html5lib/tests/testdata/tree-construction/tests19.dat::14::ElementTree::parser::namespaced': FAIL diff --git a/html5lib/tests/testdata b/html5lib/tests/testdata index 8db03d03..c305da74 160000 --- a/html5lib/tests/testdata +++ b/html5lib/tests/testdata @@ -1 +1 @@ -Subproject commit 8db03d031c90c8b68273a90aad5168f4161c3078 +Subproject commit c305da74fae50fb018870de7a042da36c1a93b65