mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
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:
parent
e0ad273951
commit
0fb4e8e4dc
@ -17,7 +17,7 @@ from urllib import unquote
|
|||||||
|
|
||||||
from calibre.ebooks.chardet import detect_xml_encoding
|
from calibre.ebooks.chardet import detect_xml_encoding
|
||||||
from calibre.constants import iswindows
|
from calibre.constants import iswindows
|
||||||
from calibre import unicode_path, as_unicode
|
from calibre import unicode_path, as_unicode, replace_entities
|
||||||
|
|
||||||
class Link(object):
|
class Link(object):
|
||||||
'''
|
'''
|
||||||
@ -147,6 +147,7 @@ class HTMLFile(object):
|
|||||||
url = match.group(i)
|
url = match.group(i)
|
||||||
if url:
|
if url:
|
||||||
break
|
break
|
||||||
|
url = replace_entities(url)
|
||||||
try:
|
try:
|
||||||
link = self.resolve(url)
|
link = self.resolve(url)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user