mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 10:33:04 +02:00
html2lrf: skip <a> links that point to remote resources
This commit is contained in:
parent
32bf0d62ed
commit
5590c98e40
1 changed files with 2 additions and 1 deletions
|
|
@ -1423,7 +1423,8 @@ def parse_tag(self, tag, parent_css):
|
|||
if tagname in ["title", "script", "meta", 'del', 'frameset']:
|
||||
pass
|
||||
elif tagname == 'a' and self.link_levels >= 0:
|
||||
if tag.has_key('href') and not self.link_exclude.match(tag['href']):
|
||||
if tag.has_key('href') and not self.link_exclude.match(tag['href'])\
|
||||
and urlparse(tag['href'])[0] in ('', 'file'):
|
||||
path = munge_paths(self.target_prefix, tag['href'])[0]
|
||||
ext = os.path.splitext(path)[1]
|
||||
if ext: ext = ext[1:].lower()
|
||||
|
|
|
|||
Loading…
Reference in a new issue