From 0b386c3cc76874afc00c50d273ecbc4a7cfe3848 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 4 Oct 2020 18:26:51 +0530 Subject: [PATCH] ODT Input: Fix a regression that broke conversion of ODT files with footnotes. Fixes #1898441 [Problem converting from .odt to .epub](https://bugs.launchpad.net/calibre/+bug/1898441) --- src/odf/odf2xhtml.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/odf/odf2xhtml.py b/src/odf/odf2xhtml.py index 5669fa3feb..7d0f7e2c27 100644 --- a/src/odf/odf2xhtml.py +++ b/src/odf/odf2xhtml.py @@ -927,9 +927,9 @@ dl.notes dd:last-of-type { page-break-after: avoid } # self.closetag('sup', False) self.writeout('[') self.opentag('a', {'href': "#citation-%d" % key}) - self.writeout(u"\u2190%d".encode('utf-8') % key) + self.writeout("←%d" % key) self.closetag('a') - self.writeout(u']\xa0'.encode('utf-8')) + self.writeout(']\xa0') self.closetag('dt') self.opentag('dd') self.writeout(note['body']) @@ -1604,7 +1604,7 @@ dl.notes dd:last-of-type { page-break-after: avoid } return self.xhtml() def _wlines(self,s): - if s != '': + if s: self.lines.append(s) def xhtml(self): @@ -1613,7 +1613,7 @@ dl.notes dd:last-of-type { page-break-after: avoid } return ''.join(self.lines) def _writecss(self, s): - if s != '': + if s: self._csslines.append(s) def _writenothing(self, s):