Fix encoding bug when using full content feeds

This commit is contained in:
Kovid Goyal 2009-06-07 11:22:01 -07:00
parent 8b17b20066
commit 3b6b27c3c4

View File

@ -151,7 +151,10 @@ class Feed(object):
link = None link = None
description = item.get('summary', None) description = item.get('summary', None)
content = '\n'.join(i.value for i in item.get('content', [])) content = [i.value for i in item.get('content', []) if i.value]
content = [i if isinstance(i, unicode) else i.decode('utf-8', 'replace')
for i in content]
content = u'\n'.join(content)
if not content.strip(): if not content.strip():
content = None content = None
if not link and not content: if not link and not content: