From c16132eba6957286e496248b4cfc8de0afdf9e8c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 24 Feb 2008 21:31:28 +0000 Subject: [PATCH] Fix handling of description in feeds --- src/libprs500/ebooks/lrf/web/profiles/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libprs500/ebooks/lrf/web/profiles/__init__.py b/src/libprs500/ebooks/lrf/web/profiles/__init__.py index 3954693603..b60f0e8151 100644 --- a/src/libprs500/ebooks/lrf/web/profiles/__init__.py +++ b/src/libprs500/ebooks/lrf/web/profiles/__init__.py @@ -105,7 +105,6 @@ class DefaultProfile(object): def build_index(self): '''Build an RSS based index.html''' articles = self.parse_feeds() - def build_sub_index(title, items): ilist = '' @@ -300,7 +299,7 @@ class DefaultProfile(object): @classmethod def process_html_description(cls, tag, strip_links=True): - src = '\n'.join(tag.contents) + src = '\n'.join(tag.contents) if hasattr(tag, 'contents') else tag match = cls.CDATA_PAT.match(src.lstrip()) if match: src = match.group(1) @@ -311,6 +310,7 @@ class DefaultProfile(object): src = src.replace(ent, unichr(name2codepoint[e])) if strip_links: src = re.compile(r'(.*?)', re.IGNORECASE|re.DOTALL).sub(r'\1', src) + return src