From 7a47c96f352aafcae4ad280e4d3d8456b53d7ffe Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sat, 30 Jun 2012 10:43:47 -0400 Subject: Fixed an html5lib tree builder crash which happened when html5lib moved a tag with a multivalued attribute from one part of the tree to another. [bug=1019603] --- bs4/testing.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bs4/testing.py') 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): "Bar" "Baz") + 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 = '
' + soup = self.soup(markup) + self.assertEqual(["css"], soup.div.div['class']) + def test_angle_brackets_in_attribute_values_are_escaped(self): self.assertSoupEquals('', '') -- cgit v1.2.3