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)

This commit is contained in:
Kovid Goyal 2012-10-06 10:18:36 +05:30
parent b6559b4f7d
commit 704219fb4f

View File

@ -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'}