diff --git a/src/calibre/ebooks/oeb/polish/check/links.py b/src/calibre/ebooks/oeb/polish/check/links.py index a8e7954488..8f6e9bf5e1 100644 --- a/src/calibre/ebooks/oeb/polish/check/links.py +++ b/src/calibre/ebooks/oeb/polish/check/links.py @@ -102,6 +102,8 @@ def check_mimetypes(container): for name, mt in container.mime_map.iteritems(): gt = container.guess_type(name) if mt != gt: + if mt == 'application/oebps-page-map+xml' and name.lower().endswith('.xml'): + continue a(MimetypeMismatch(container, name, mt, gt)) return errors diff --git a/src/calibre/gui2/tweak_book/editor/__init__.py b/src/calibre/gui2/tweak_book/editor/__init__.py index 25cee316af..94215621d4 100644 --- a/src/calibre/gui2/tweak_book/editor/__init__.py +++ b/src/calibre/gui2/tweak_book/editor/__init__.py @@ -16,7 +16,7 @@ def syntax_from_mime(name, mime): return 'html' if mime in OEB_STYLES: return 'css' - if mime in {guess_type('a.opf'), guess_type('a.ncx'), guess_type('a.xml')}: + if mime in {guess_type('a.opf'), guess_type('a.ncx'), guess_type('a.xml'), 'application/oebps-page-map+xml'}: return 'xml' if mime.startswith('text/'): return 'text'