From 0fb4e8e4dc471a945e5eb46b9eec33cc68a4a86b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 29 Dec 2012 14:53:14 +0530 Subject: [PATCH] HTML Input: Handle entities inside href attributes when following the links in an HTML file. Fixes #1094203 (links in EPUB of ebook-convert`ed HTML files point to HTML files in /tmp/calibre_*) --- src/calibre/ebooks/html/input.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/html/input.py b/src/calibre/ebooks/html/input.py index c2ec6f9bce..9683837ad6 100644 --- a/src/calibre/ebooks/html/input.py +++ b/src/calibre/ebooks/html/input.py @@ -17,7 +17,7 @@ from urllib import unquote from calibre.ebooks.chardet import detect_xml_encoding from calibre.constants import iswindows -from calibre import unicode_path, as_unicode +from calibre import unicode_path, as_unicode, replace_entities class Link(object): ''' @@ -147,6 +147,7 @@ class HTMLFile(object): url = match.group(i) if url: break + url = replace_entities(url) try: link = self.resolve(url) except ValueError: