From 6cd338ad41b5d850b9a465951fb6eeb3410a594a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Apr 2013 08:44:54 +0530 Subject: [PATCH] PDF Output: Fix hyperlinks not working when converting an EPUB whose individual files have names with URL unsafe characters. Fixes #1169795 (Private bug) --- src/calibre/ebooks/pdf/render/links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/pdf/render/links.py b/src/calibre/ebooks/pdf/render/links.py index 97a6551dbd..c9d4d8d43c 100644 --- a/src/calibre/ebooks/pdf/render/links.py +++ b/src/calibre/ebooks/pdf/render/links.py @@ -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'),