From d9567cc0cae069cbf119d9effd1b3925bd800162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gra=C3=9Fl?= Date: Fri, 5 Nov 2010 13:17:58 +0100 Subject: [PATCH 1/2] small os x bf --- src/calibre/ebooks/html/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/html/output.py b/src/calibre/ebooks/html/output.py index a083e0f4f1..a36c808302 100644 --- a/src/calibre/ebooks/html/output.py +++ b/src/calibre/ebooks/html/output.py @@ -102,7 +102,7 @@ class HTMLOutput(OutputFormatPlugin): self.opts = opts meta = EasyMeta(oeb_book.metadata) - tempdir = PersistentTemporaryDirectory() + tempdir = os.path.realpath(PersistentTemporaryDirectory()) output_file = os.path.join(tempdir, basename(re.sub(r'\.zip', '', output_path)+'.html')) output_dir = re.sub(r'\.html', '', output_file)+'_files' From a96e8b94cfbd0bc132e65e2e9b87f6123b6c809d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gra=C3=9Fl?= Date: Fri, 5 Nov 2010 13:29:14 +0100 Subject: [PATCH 2/2] rx bf --- src/calibre/ebooks/html/output.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/ebooks/html/output.py b/src/calibre/ebooks/html/output.py index a36c808302..5c984162ac 100644 --- a/src/calibre/ebooks/html/output.py +++ b/src/calibre/ebooks/html/output.py @@ -151,6 +151,7 @@ class HTMLOutput(OutputFormatPlugin): head_content = etree.tostring(head, pretty_print=True, encoding='utf-8') head_content = re.sub(r'\<\/?head.*\>', '', head_content) head_content = re.sub(re.compile(r'\', re.M|re.S), '', head_content) + head_content = re.sub(r'<(title)([^>]*)/>', r'<\1\2>', head_content) # get & clean HTML -data body = root.xpath('//h:body', namespaces={'h': 'http://www.w3.org/1999/xhtml'})[0]