mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Ignore unparseable links instead of aborting the conversion on them. Fixes #1429282 [HTML to PDF crashes with ebook-convert (Invalid IPv6 URL)](https://bugs.launchpad.net/calibre/+bug/1429282)
This commit is contained in:
parent
3a284d0860
commit
fc2fab8a53
@ -78,7 +78,11 @@ class Links(object):
|
||||
pass
|
||||
else:
|
||||
url = href + (('#'+frag) if frag else '')
|
||||
try:
|
||||
purl = urlparse(url)
|
||||
except Exception:
|
||||
self.pdf.debug('Ignoring unparseable URL: %r' % url)
|
||||
continue
|
||||
if purl.scheme and purl.scheme != 'file':
|
||||
action = Dictionary({
|
||||
'Type':Name('Action'), 'S':Name('URI'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user