From 6d2208759ccc1ddac1ad6570c1bed406ed116e3f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 18 Jun 2011 00:11:15 -0600 Subject: [PATCH] Conversion: Convert
tags with text in them into as ADE cannot handle them. Fixes #794427 (Private bug) --- src/calibre/ebooks/oeb/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index db83fca496..a9c7664953 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -1055,6 +1055,12 @@ class Manifest(object): and len(a) == 0 and not a.text: remove_elem(a) + # Convert
s with content into paragraphs as ADE can't handle + # them + for br in xpath(data, '//h:br'): + if len(br) > 0 or br.text: + br.tag = XHTML('div') + return data def _parse_txt(self, data):