mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
HTMLZ Output: Fix an error when converting a document that has SVG images
This commit is contained in:
parent
5c7b4b340a
commit
833c0db683
@ -99,7 +99,7 @@ class HTMLZOutput(OutputFormatPlugin):
|
|||||||
for item in oeb_book.manifest:
|
for item in oeb_book.manifest:
|
||||||
if item.media_type in OEB_IMAGES and item.href in images:
|
if item.media_type in OEB_IMAGES and item.href in images:
|
||||||
if item.media_type == SVG_MIME:
|
if item.media_type == SVG_MIME:
|
||||||
data = etree.tostring(item.data, encoding='unicode')
|
data = etree.tostring(item.data, encoding='unicode').encode('utf-8')
|
||||||
else:
|
else:
|
||||||
data = item.data
|
data = item.data
|
||||||
fname = os.path.join(tdir, u'images', images[item.href])
|
fname = os.path.join(tdir, u'images', images[item.href])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user