diff --git a/CHANGES.md b/CHANGES.md index dd8cbd6e..5917fe53 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ * Update CacheControl library 0.12.4 (bd94f7e) to 0.12.5 (cd91309) * Update Certifi 2018.01.18 (e225253) to 2018.08.24 (8be9f89) * Update dateutil module 2.7.2 (ff03c0f) to 2.7.2 (49690ee) +* Update feedparser 5.2.1 (5646f4c) to 5.2.1 (2b11c80) [develop changelog] diff --git a/lib/feedparser/mixin.py b/lib/feedparser/mixin.py index 5f97dc80..e5950f8b 100644 --- a/lib/feedparser/mixin.py +++ b/lib/feedparser/mixin.py @@ -442,6 +442,11 @@ class _FeedParserMixin( element, expectingText, pieces = self.elementstack.pop() + # Ensure each piece is a str for Python 3 + for (i, v) in enumerate(pieces): + if isinstance(v, bytes_): + pieces[i] = v.decode('utf-8') + if self.version == 'atom10' and self.contentparams.get('type', 'text') == 'application/xhtml+xml': # remove enclosing child element, but only if it is a