mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix non XML safe characters in feed descriptions causing news download to fail. Fixes #1707545 [News Resource download not working..National Review Online](https://bugs.launchpad.net/calibre/+bug/1707545)
This commit is contained in:
parent
790b8273a7
commit
bf5867e380
@ -164,7 +164,7 @@ class FeedTemplate(Template):
|
||||
),
|
||||
CLASS('calibre_feed_image')))
|
||||
if getattr(feed, 'description', None):
|
||||
d = DIV(feed.description, CLASS('calibre_feed_description',
|
||||
d = DIV(clean_xml_chars(feed.description), CLASS('calibre_feed_description',
|
||||
'calibre_rescale_80'))
|
||||
d.append(BR())
|
||||
div.append(d)
|
||||
@ -284,6 +284,7 @@ class TouchscreenIndexTemplate(Template):
|
||||
class TouchscreenFeedTemplate(Template):
|
||||
|
||||
def _generate(self, f, feeds, cutoff, extra_css=None, style=None):
|
||||
from calibre.utils.cleantext import clean_xml_chars
|
||||
|
||||
def trim_title(title,clip=18):
|
||||
if len(title)>clip:
|
||||
@ -353,7 +354,7 @@ class TouchscreenFeedTemplate(Template):
|
||||
),
|
||||
CLASS('calibre_feed_image')))
|
||||
if getattr(feed, 'description', None):
|
||||
d = DIV(feed.description, CLASS('calibre_feed_description',
|
||||
d = DIV(clean_xml_chars(feed.description), CLASS('calibre_feed_description',
|
||||
'calibre_rescale_80'))
|
||||
d.append(BR())
|
||||
div.append(d)
|
||||
|
Loading…
x
Reference in New Issue
Block a user