mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug affecting the Tableof COntents in EPUB files generated from PRC files. The generated TOC would cause the SONY reader to crash if the original PRC file contained links to the internet
This commit is contained in:
parent
16a07347e4
commit
944435fd2f
@ -309,7 +309,8 @@ class MobiReader(object):
|
|||||||
except:
|
except:
|
||||||
text = ''
|
text = ''
|
||||||
text = ent_pat.sub(entity_to_unicode, text)
|
text = ent_pat.sub(entity_to_unicode, text)
|
||||||
tocobj.add_item(toc.partition('#')[0], a['href'][1:], text)
|
if a['href'].startswith('#'):
|
||||||
|
tocobj.add_item(toc.partition('#')[0], a['href'][1:], text)
|
||||||
if tocobj is not None:
|
if tocobj is not None:
|
||||||
opf.set_toc(tocobj)
|
opf.set_toc(tocobj)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user