Update feedparser 5.2.1 (5646f4c) → 5.2.1 (2b11c80).

This commit is contained in:
JackDandy 2018-09-04 22:19:18 +01:00
parent 653261dbee
commit 6388bc90d4
2 changed files with 6 additions and 5 deletions

View file

@ -4,6 +4,7 @@
* Update CacheControl library 0.12.4 (bd94f7e) to 0.12.5 (cd91309) * Update CacheControl library 0.12.4 (bd94f7e) to 0.12.5 (cd91309)
* Update Certifi 2018.01.18 (e225253) to 2018.08.24 (8be9f89) * Update Certifi 2018.01.18 (e225253) to 2018.08.24 (8be9f89)
* Update dateutil module 2.7.2 (ff03c0f) to 2.7.2 (49690ee) * 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] [develop changelog]

View file

@ -442,6 +442,11 @@ class _FeedParserMixin(
element, expectingText, pieces = self.elementstack.pop() 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': if self.version == 'atom10' and self.contentparams.get('type', 'text') == 'application/xhtml+xml':
# remove enclosing child element, but only if it is a <div> and # remove enclosing child element, but only if it is a <div> and
# only if all the remaining content is nested underneath it. # only if all the remaining content is nested underneath it.
@ -463,11 +468,6 @@ class _FeedParserMixin(
else: else:
pieces = pieces[1:-1] pieces = pieces[1:-1]
# 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')
output = ''.join(pieces) output = ''.join(pieces)
if stripWhitespace: if stripWhitespace:
output = output.strip() output = output.strip()