mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 23:35:04 +02:00
Fix #2841 (Failed to convert to LRF)
This commit is contained in:
parent
ed92482019
commit
eb625d37c3
1 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
|||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import textwrap
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
from lxml import etree
|
||||
|
||||
|
|
@ -82,8 +83,9 @@ def insert_metadata(self, mi):
|
|||
except:
|
||||
title = _('Unknown')
|
||||
html = self.JACKET_TEMPLATE%dict(xmlns=XPNSMAP['h'],
|
||||
title=title, comments=comments,
|
||||
jacket=_('Book Jacket'), series=series, tags=tags)
|
||||
title=escape(title), comments=escape(comments),
|
||||
jacket=escape(_('Book Jacket')), series=escape(series),
|
||||
tags=escape(tags))
|
||||
id, href = self.oeb.manifest.generate('jacket', 'jacket.xhtml')
|
||||
root = etree.fromstring(html)
|
||||
item = self.oeb.manifest.add(id, href, guess_type(href)[0], data=root)
|
||||
|
|
|
|||
Loading…
Reference in a new issue