diff options
Diffstat (limited to 'bs4/testing.py')
-rw-r--r-- | bs4/testing.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 5a84b0b..51f7e22 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -202,6 +202,14 @@ class HTMLTreeBuilderSmokeTest(object): "<tbody><tr><td>Bar</td></tr></tbody>" "<tfoot><tr><td>Baz</td></tr></tfoot></table>") + def test_deeply_nested_multivalued_attribute(self): + # html5lib can set the attributes of the same tag many times + # as it rearranges the tree. This has caused problems with + # multivalued attributes. + markup = '<table><div><div class="css"></div></div></table>' + soup = self.soup(markup) + self.assertEqual(["css"], soup.div.div['class']) + def test_angle_brackets_in_attribute_values_are_escaped(self): self.assertSoupEquals('<a b="<a>"></a>', '<a b="<a>"></a>') |