From 40b1266e7c9a6f2aa12ccd7e327eea01a4305b2b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Jun 2011 12:42:59 -0600 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/iterator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/oeb/iterator.py b/src/calibre/ebooks/oeb/iterator.py index 299c77af10..92a4febb6c 100644 --- a/src/calibre/ebooks/oeb/iterator.py +++ b/src/calibre/ebooks/oeb/iterator.py @@ -18,7 +18,7 @@ from calibre.ebooks.chardet import xml_to_unicode from calibre.utils.zipfile import safe_replace from calibre.utils.config import DynamicConfig from calibre.utils.logging import Log -from calibre import guess_type, prints +from calibre import guess_type, prints, prepare_string_for_xml from calibre.ebooks.oeb.transforms.cover import CoverManager TITLEPAGE = CoverManager.SVG_TEMPLATE.decode('utf-8').replace(\ @@ -229,8 +229,8 @@ class EbookIterator(object): cover = self.opf.cover if self.ebook_ext in ('lit', 'mobi', 'prc', 'opf', 'fb2') and cover: cfile = os.path.join(self.base, 'calibre_iterator_cover.html') - chtml = (TITLEPAGE%os.path.relpath(cover, self.base).replace(os.sep, - '/')).encode('utf-8') + rcpath = os.path.relpath(cover, self.base).replace(os.sep, '/') + chtml = (TITLEPAGE%prepare_string_for_xml(rcpath, True)).encode('utf-8') open(cfile, 'wb').write(chtml) self.spine[0:0] = [SpineItem(cfile, mime_type='application/xhtml+xml')]