diff options
author | Leonard Richardson <leonardr@segfault.org> | 2016-12-19 20:34:19 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2016-12-19 20:34:19 -0500 |
commit | 0922e78d1d14c09132be69f7f837d8e4e9e924ef (patch) | |
tree | e94dfe042a0bb85b154c89a3a41bee8326de5fe4 /bs4/tests/test_html5lib.py | |
parent | 97a027e52aba02297dc09105b071c93dcf8bb9c4 (diff) | |
parent | a07a28ac10e5686d096fd0f4225e01ff137ec80f (diff) |
Fixed foster parenting when html5lib is the tree builder. Thanks to Geoffrey Sneddon for a patch and test.
Diffstat (limited to 'bs4/tests/test_html5lib.py')
-rw-r--r-- | bs4/tests/test_html5lib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py index eba7e84..0f89d62 100644 --- a/bs4/tests/test_html5lib.py +++ b/bs4/tests/test_html5lib.py @@ -123,3 +123,8 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest): a1, a2 = soup.find_all('a') self.assertEqual(a1, a2) assert a1 is not a2 + + def test_foster_parenting(self): + markup = b"""<table><td></tbody>A""" + soup = self.soup(markup) + self.assertEqual(u"<body>A<table><tbody><tr><td></td></tr></tbody></table></body>", soup.body.decode()) |