summaryrefslogtreecommitdiff
path: root/bs4/builder/_html5lib.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-20 11:23:19 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-20 11:23:19 -0400
commit0f0ce683638ec47d87d52024a886995af114bdd7 (patch)
tree3d2a006ef35a29f62b5a87342e9bbfb7113fd540 /bs4/builder/_html5lib.py
parenta4d113a2f6648d7f97d29bbbd2634949a4050eb0 (diff)
Fixed another bug by which the html5lib tree builder could create a
disconnected tree. [bug=1182089]
Diffstat (limited to 'bs4/builder/_html5lib.py')
-rw-r--r--bs4/builder/_html5lib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bs4/builder/_html5lib.py b/bs4/builder/_html5lib.py
index 23e26b6..aa91435 100644
--- a/bs4/builder/_html5lib.py
+++ b/bs4/builder/_html5lib.py
@@ -131,6 +131,7 @@ class Element(html5lib.treebuilders._base.Node):
old_element = self.element.contents[-1]
new_element = self.soup.new_string(old_element + node.element)
old_element.replace_with(new_element)
+ self.soup.previous_element = new_element
else:
self.soup.object_was_parsed(node.element, parent=self.element)