diff options
-rw-r--r-- | NEWS.txt | 3 | ||||
-rw-r--r-- | bs4/element.py | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -24,6 +24,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] + * Now that lxml's segfault on invalid doctype has been fixed, fix a corresponding problem on the Beautiful Soup end that was previously invisible. [bug=984936] diff --git a/bs4/element.py b/bs4/element.py index f38d9b4..5ccb019 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): |