mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle invalid xmnlns:= and xmlns=
This commit is contained in:
parent
fa124ab696
commit
671d5cec4b
@ -106,6 +106,8 @@ class OEBReader:
|
||||
elem.tag = OPF(barename(elem.tag))
|
||||
nsmap.update(OPF2_NSMAP)
|
||||
attrib = dict(opf.attrib)
|
||||
if xmlns := attrib.pop('xmlns:'):
|
||||
attrib['xmlns'] = xmlns
|
||||
nroot = etree.Element(OPF('package'),
|
||||
nsmap={None: OPF2_NS}, attrib=attrib)
|
||||
metadata = etree.SubElement(nroot, OPF('metadata'), nsmap=nsmap)
|
||||
|
Loading…
x
Reference in New Issue
Block a user