mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Properly decoding text/plain.
This commit is contained in:
parent
c1d1534d67
commit
73160e0faf
1 changed files with 2 additions and 0 deletions
|
@ -113,6 +113,8 @@ def pre_process_story(entry, encoding):
|
|||
|
||||
if 'summary_detail' in entry and entry['summary_detail'].get('type', None) == 'text/plain':
|
||||
entry['story_content'] = feedparser._sanitizeHTML(entry['story_content'], encoding, 'text/plain')
|
||||
if encoding and not isinstance(entry['story_content'], unicode):
|
||||
entry['story_content'] = entry['story_content'].decode(encoding, 'ignore')
|
||||
|
||||
# Add each media enclosure as a Download link
|
||||
for media_content in chain(entry.get('media_content', [])[:5], entry.get('links', [])[:5]):
|
||||
|
|
Loading…
Add table
Reference in a new issue