diff options
-rw-r--r-- | NEWS.txt | 14 | ||||
-rw-r--r-- | bs4/element.py | 2 |
2 files changed, 10 insertions, 6 deletions
@@ -1,14 +1,18 @@ -= 4.1.1 (Unreleased) = += 4.1.1 (20120703) = * 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] + moved a tag with a multivalued attribute from one part of the tree + to another. [bug=1019603] -* Correctly handle closing tags with an XML namespace declared. Patch +* Correctly display closing tags with an XML namespace declared. Patch by Andreas Kostyrka. [bug=1019635] * Fixed a typo that made parsing significantly slower than it should - have been. [bug=1020268] + have been, and also waited too long to close tags with XML + namespaces. [bug=1020268] + +* get_text() now returns an empty Unicode string if there is no text, + rather than an empty bytestring. [bug=1020387] = 4.1.0 (20120529) = diff --git a/bs4/element.py b/bs4/element.py index 744a4e0..4a4d3ed 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -820,7 +820,7 @@ class Tag(PageElement): for string in self._all_strings(True): yield string - def get_text(self, separator="", strip=False): + def get_text(self, separator=u"", strip=False): """ Get all child strings, concatenated using the given separator. """ |