diff options
-rw-r--r-- | NEWS.txt | 3 | ||||
-rw-r--r-- | bs4/element.py | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -17,6 +17,9 @@ * Fix a bug by which keyword arguments to find_parent() were not being passed on. [bug=1126734] +* Stop a crash when unwisely messing with a tag that's been + decomposed. [bug=1097699] + = 4.1.3 (20120820) = * Skipped a test under Python 2.6 and Python 3.1 to avoid a spurious 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): |