From 76ec19ef1de6bc9d051db3d7bf135d84c0fff692 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 11 May 2015 11:16:17 +0530 Subject: [PATCH] Fix language definition on body tag being ignored during conversion --- src/calibre/ebooks/oeb/parse_utils.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/calibre/ebooks/oeb/parse_utils.py b/src/calibre/ebooks/oeb/parse_utils.py index a095018c1a..61029741a4 100644 --- a/src/calibre/ebooks/oeb/parse_utils.py +++ b/src/calibre/ebooks/oeb/parse_utils.py @@ -421,12 +421,6 @@ def parse_html(data, log=None, decoder=None, preprocessor=None, for x in r: x.tag = XHTML('span') - # Remove lang redefinition inserted by the amazing Microsoft Word! - body = xpath(data, '/h:html/h:body')[0] - for key in list(body.attrib.keys()): - if key == 'lang' or key.endswith('}lang'): - body.attrib.pop(key) - def remove_elem(a): p = a.getparent() idx = p.index(a) -1