From 31c4f65977c55fda106253418ea4e177c9bc3467 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Jan 2014 13:10:54 +0530 Subject: [PATCH] Ensure html files have mimetype set to xhtml mimetype when exploding azw3 files, so that check book does not complain about them. --- src/calibre/ebooks/mobi/reader/mobi8.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/mobi/reader/mobi8.py b/src/calibre/ebooks/mobi/reader/mobi8.py index 11cfd731ad..6536c92618 100644 --- a/src/calibre/ebooks/mobi/reader/mobi8.py +++ b/src/calibre/ebooks/mobi/reader/mobi8.py @@ -458,6 +458,9 @@ class Mobi8Reader(object): return os.path.basename(path) == 'debug-raw.html' opf.create_manifest_from_files_in([os.getcwdu()], exclude=exclude) + for entry in opf.manifest: + if entry.mime_type == 'text/html': + entry.mime_type = 'application/xhtml+xml' opf.create_spine(spine) opf.set_toc(toc) ppd = self.resc_data.get('page-progression-direction', None)