mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix language definition on body tag being ignored during conversion
This commit is contained in:
parent
89c0028fe8
commit
76ec19ef1d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user