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)