summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-06 21:38:10 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-06 21:38:10 -0400
commit4a0f656752dc2de3f3451397e09e806ad2874ea1 (patch)
tree3dc037930ac080fd9c3ec50940e8803f0dcec128 /bs4/element.py
parentc4ce22b415ab81ba0e3fb4a3fb28f4ce68dccbde (diff)
Stop a crash when unwisely messing with a tag that's been
decomposed. [bug=1097699]
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bs4/element.py b/bs4/element.py
index d58da92..c081eba 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -915,6 +915,7 @@ class Tag(PageElement):
while i is not None:
next = i.next_element
i.__dict__.clear()
+ i.contents = []
i = next
def clear(self, decompose=False):