mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-27 01:02:34 -04:00
...
This commit is contained in:
@@ -395,7 +395,7 @@ def transform_html(container, name, virtualize_resources, link_uid, link_to_map,
|
||||
href = a.get(attr)
|
||||
if href:
|
||||
href = link_replacer(name, href)
|
||||
else:
|
||||
elif attr in a.attrib:
|
||||
a.set(attr, 'javascript:void(0)')
|
||||
if href and href.startswith(link_uid):
|
||||
a.set(attr, 'javascript:void(0)')
|
||||
@@ -535,7 +535,7 @@ def virtualize_html(container, name, link_uid, link_to_map, virtualized_names):
|
||||
elif href:
|
||||
a.set('target', '_blank')
|
||||
a.set('rel', 'noopener noreferrer')
|
||||
else:
|
||||
elif attr in a.attrib:
|
||||
a.set(attr, 'javascript:void(0)')
|
||||
|
||||
for a in link_xpath(root):
|
||||
|
||||
Reference in New Issue
Block a user