From 954e04a52d98d5922abfeea24db813ae4a26914e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 18 Jun 2011 10:00:57 -0600 Subject: [PATCH] Fix #799171 (In 0.8.6 on Mac: Loading HTML pkg as ZIP file no longer picks up external style sheet from folder) --- src/calibre/ebooks/html/input.py | 2 +- src/calibre/ebooks/oeb/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/html/input.py b/src/calibre/ebooks/html/input.py index ce6c46c6cf..69eb493c7d 100644 --- a/src/calibre/ebooks/html/input.py +++ b/src/calibre/ebooks/html/input.py @@ -457,7 +457,7 @@ class HTMLInput(InputFormatPlugin): href=bhref) guessed = self.guess_type(href)[0] media_type = guessed or self.BINARY_MIME - if 'text' in media_type: + if media_type == 'text/plain': self.log.warn('Ignoring link to text file %r'%link_) return None diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index a9c7664953..d75620adbd 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -1162,7 +1162,7 @@ class Manifest(object): data = self._parse_xml(data) elif self.media_type.lower() in OEB_STYLES: data = self._parse_css(data) - elif 'text' in self.media_type.lower(): + elif self.media_type.lower() == 'text/plain': self.oeb.log.warn('%s contains data in TXT format'%self.href, 'converting to HTML') data = self._parse_txt(data)