From 221421fe51c2bc80eb93a081d741c50ee30b8555 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 19 May 2008 12:35:35 -0700 Subject: [PATCH] Improve handling of images in mobi2oeb --- src/calibre/ebooks/mobi/reader.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index 1cda622cb5..cbbdadf43d 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -270,12 +270,17 @@ class MobiReader(object): im.convert('RGB').save(open(path, 'wb'), format='JPEG') def fix_images(match): - one = re.compile(r'src=["\']{0,1}[^\'"]+["\']{0,1}', re.IGNORECASE).sub('', match.group(1)).strip() - return '', re.IGNORECASE|re.DOTALL)\ .sub(fix_images, self.processed_html) def get_metadata(stream):