Fix #1158 (Failure to encode epub)

This commit is contained in:
Kovid Goyal 2008-10-11 18:23:28 -07:00
parent 84e3d13d63
commit 3a9297e5e8

View File

@ -175,6 +175,8 @@ class MobiReader(object):
self.replace_page_breaks()
self.cleanup_html()
if self.processed_html.startswith('<body'):
self.processed_html = '<html><head></head>'+self.processed_html+'</html>'
self.processed_html = \
re.compile('<head>', re.IGNORECASE).sub(
'\n<head>\n'