mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-04 21:13:36 +02:00
HTMLZ Output: Fix handling of images with URL unsafe filenames
Fixes #1192687 [htmlz output not rewriting img and urls](https://bugs.launchpad.net/calibre/+bug/1192687)
This commit is contained in:
parent
f964f512cf
commit
b7d7a98fa6
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
from calibre import prepare_string_for_xml
|
||||
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, barename, namespace,\
|
||||
OEB_IMAGES, XLINK, rewrite_links
|
||||
OEB_IMAGES, XLINK, rewrite_links, urlnormalize
|
||||
from calibre.ebooks.oeb.stylizer import Stylizer
|
||||
from calibre.utils.logging import default_log
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ def map_resources(self, oeb_book):
|
|||
def rewrite_link(self, url, page=None):
|
||||
if not page:
|
||||
return url
|
||||
abs_url = page.abshref(url)
|
||||
abs_url = page.abshref(urlnormalize(url))
|
||||
if abs_url in self.images:
|
||||
return 'images/%s' % self.images[abs_url]
|
||||
if abs_url in self.links:
|
||||
|
|
|
|||
Loading…
Reference in a new issue