mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 23:04:00 +02: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
1 changed files with 2 additions and 1 deletions
|
|
@ -309,7 +309,8 @@ def create_opf(self, htmlfile, guide=None):
|
|||
except:
|
||||
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:
|
||||
opf.set_toc(tocobj)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue