1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-01 07:22:26 +01:00

Fix issue with crash on LibreOffice format.

During tests, there was issue regarding ODF2XHTML.xhtml() method, which
assumes, that all lines are stored as strings. Although, in case of
single items, like footnotes, there is a chance, that numbers are stored
as ints. In this patch we assure, that all lines has to be strings. This
bug also affects current version of Calibre (as of cf5baaf449 commit).
This commit is contained in:
2020-04-12 13:44:38 +02:00
parent 5be4996b7b
commit 5bb235772d

View File

@@ -280,7 +280,11 @@ class Extract(ODF2XHTML):
if not mi.authors:
mi.authors = [_('Unknown')]
self.filter_load(stream, mi, log)
html = self.xhtml()
# NOTE(gryf): Here is a workaround for ODF2XHTML.xhtml() method,
# which expects, that all lines are strings.
html = ''.join([str(l) for l in self.lines])
# A blanket img specification like this causes problems
# with EPUB output as the containing element often has
# an absolute height and width set that is larger than