PDF Output: Fix hyperlinks not working when converting an EPUB whose individual files have names with URL unsafe characters. Fixes #1169795 (Private bug)

This commit is contained in:
Kovid Goyal 2013-04-21 08:44:54 +05:30
parent 4f3bf4296a
commit 6cd338ad41

View File

@ -51,7 +51,7 @@ class Links(object):
for link in self.links:
path, href, frag = link[0]
page, rect = link[1:]
combined_path = os.path.abspath(os.path.join(os.path.dirname(path), *href.split('/')))
combined_path = os.path.abspath(os.path.join(os.path.dirname(path), *unquote(href).split('/')))
is_local = not href or combined_path in self.anchors
annot = Dictionary({
'Type':Name('Annot'), 'Subtype':Name('Link'),