From 704219fb4ffa8c377a61cb13315cba63315f9e09 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 6 Oct 2012 10:18:36 +0530 Subject: [PATCH] KF8 Output: Fix handling of input documents that have URL unsafe characters in the file names of their images. Fixes #1062477 (KF8 generation fails with images in PG epubs) --- src/calibre/ebooks/mobi/writer8/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/writer8/main.py b/src/calibre/ebooks/mobi/writer8/main.py index 5acb04ebb3..b1479ee7c3 100644 --- a/src/calibre/ebooks/mobi/writer8/main.py +++ b/src/calibre/ebooks/mobi/writer8/main.py @@ -106,7 +106,7 @@ class KF8Writer(object): not used for fonts. ''' def pointer(item, oref): - ref = item.abshref(oref) + ref = urlnormalize(item.abshref(oref)) idx = self.resources.item_map.get(ref, None) if idx is not None: is_image = self.resources.records[idx-1][:4] not in {b'FONT'}