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_*)

This commit is contained in:
Kovid Goyal 2012-12-29 14:53:14 +05:30
parent e0ad273951
commit 0fb4e8e4dc

View File

@ -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: