mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2578 (ePub output does not seem to work with ADE for Windows)
This commit is contained in:
parent
d596ed0341
commit
118d0aa0ce
@ -810,6 +810,12 @@ class Manifest(object):
|
|||||||
r = [x for x in data.iterdescendants(etree.Element) if 'microsoft-com' in x.tag]
|
r = [x for x in data.iterdescendants(etree.Element) if 'microsoft-com' in x.tag]
|
||||||
for x in r:
|
for x in r:
|
||||||
x.tag = XHTML('span')
|
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)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _parse_css(self, data):
|
def _parse_css(self, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user