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:
Kovid Goyal 2009-01-02 15:46:48 -08:00
parent 16a07347e4
commit 944435fd2f

View File

@ -309,6 +309,7 @@ class MobiReader(object):
except:
text = ''
text = ent_pat.sub(entity_to_unicode, text)
if a['href'].startswith('#'):
tocobj.add_item(toc.partition('#')[0], a['href'][1:], text)
if tocobj is not None:
opf.set_toc(tocobj)