RB Input: Do not generate empty title tag

This commit is contained in:
Kovid Goyal 2012-02-05 23:24:19 +05:30
parent 08c840cba3
commit abdb32e1a7

View File

@ -89,7 +89,7 @@ class Reader(object):
output += self.stream.read(toc_item.size).decode('cp1252' if self.encoding is None else self.encoding, 'replace') output += self.stream.read(toc_item.size).decode('cp1252' if self.encoding is None else self.encoding, 'replace')
with open(os.path.join(output_dir, toc_item.name), 'wb') as html: with open(os.path.join(output_dir, toc_item.name), 'wb') as html:
html.write(output.encode('utf-8')) html.write(output.replace('<TITLE>', '<TITLE> ').encode('utf-8'))
def get_image(self, toc_item, output_dir): def get_image(self, toc_item, output_dir):
if toc_item.flags != 0: if toc_item.flags != 0: