diff --git a/src/calibre/ebooks/oeb/transforms/jacket.py b/src/calibre/ebooks/oeb/transforms/jacket.py index a29af2d7e9..3c6ba2621f 100644 --- a/src/calibre/ebooks/oeb/transforms/jacket.py +++ b/src/calibre/ebooks/oeb/transforms/jacket.py @@ -15,7 +15,7 @@ from lxml import etree from calibre import guess_type, strftime from calibre.constants import iswindows from calibre.ebooks.BeautifulSoup import BeautifulSoup -from calibre.ebooks.oeb.base import XPath, XHTML_NS, XHTML, xml2text, urldefrag +from calibre.ebooks.oeb.base import XPath, XHTML_NS, XHTML, xml2text, urldefrag, urlnormalize from calibre.library.comments import comments_to_html from calibre.utils.date import is_date_undefined, as_local_time from calibre.utils.icu import sort_key @@ -43,7 +43,10 @@ class Base(object): if removed >= limit: break href = item.abshref(img.get('src')) - image = self.oeb.manifest.hrefs.get(href, None) + image = self.oeb.manifest.hrefs.get(href) + if image is None: + href = urlnormalize(href) + image = self.oeb.manifest.hrefs.get(href) if image is not None: self.oeb.manifest.remove(image) self.oeb.guide.remove_by_href(href)