mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-28 17:52:34 -04:00
Fix #897531 (epub output do not add xml:lang from lang attribute)
This commit is contained in:
@@ -132,9 +132,11 @@ class EPUBOutput(OutputFormatPlugin):
|
||||
|
||||
def upshift_markup(self): # {{{
|
||||
'Upgrade markup to comply with XHTML 1.1 where possible'
|
||||
from calibre.ebooks.oeb.base import XPath
|
||||
from calibre.ebooks.oeb.base import XPath, XML
|
||||
for x in self.oeb.spine:
|
||||
root = x.data
|
||||
if (not root.get(XML('lang'))) and (root.get('lang')):
|
||||
root.set(XML('lang'), root.get('lang'))
|
||||
body = XPath('//h:body')(root)
|
||||
if body:
|
||||
body = body[0]
|
||||
|
||||
Reference in New Issue
Block a user