From 1d0606ad18b687557579f19d0114c3fb30bf7e25 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 5 May 2009 12:28:30 -0700 Subject: [PATCH 1/2] EPUB Output:Replace non breaking hyphens with ordinary hyphens as the default fonts that come with ADE don't suport them. --- src/calibre/ebooks/html.py | 1 + src/calibre/manual/faq.rst | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/calibre/ebooks/html.py b/src/calibre/ebooks/html.py index 6d479ebaef..3365df576e 100644 --- a/src/calibre/ebooks/html.py +++ b/src/calibre/ebooks/html.py @@ -392,6 +392,7 @@ class PreProcessor(object): opts = getattr(self, 'opts', False) if opts and hasattr(opts, 'profile') and getattr(opts.profile, 'remove_special_chars', False): html = opts.profile.remove_special_chars.sub('', html) + html = html.replace(u'\u2011', '-') if self.is_baen(html): rules = [] elif self.is_book_designer(html): diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index 1407adad58..0c02ef2925 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -218,6 +218,10 @@ If it still wont launch, start a command prompt (press the windows key and R; th Post any output you see in a help message on the `Forum `_. +My antivirus programs claims |app| is a virus/trojan? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Your antivirus program is wrong. |app| is a completely open source product. You can actually browse the source code yourself (or hire someone to do it for you) to verify that it is not a virus. Please report the false identification to whatever company you buy your antivirus software from. + I want some feature added to |app|. What can I do? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f9df174fd9b6bb8f89e33fc2d70c6ec0dbe59cb3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 5 May 2009 14:00:12 -0700 Subject: [PATCH 2/2] MOBI Input: Fix conversion of MOBI files that do not have opening tags in their markup --- src/calibre/ebooks/mobi/reader.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index fa1c0fc0d8..44d3fbd9f7 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -296,6 +296,14 @@ class MobiReader(object): from lxml.html import soupparser print 'Markup contains unclosed

tags, parsing using BeatifulSoup' root = soupparser.fromstring(self.processed_html) + if root[0].tag != 'html': + nroot = html.fromstring('') + bod = nroot.find('body') + for child in list(root): + child.getparent().remove(child) + bod.append(child) + root = nroot + self.upshift_markup(root) guides = root.xpath('//guide') guide = guides[0] if guides else None