mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
LIT Input: Workaround LIT files generated by some broken software that sets the OPF namespace to http://openebook.org/namespaces/oeb-package/1.0. Fixes #8875 (OEBError: Invalid namespace, when opening LIT eBook in Ebookreader from Calibre)
This commit is contained in:
parent
b57ae20862
commit
f461783a37
@ -103,6 +103,8 @@ class OEBReader(object):
|
||||
data = self.oeb.container.read(None)
|
||||
data = self.oeb.decode(data)
|
||||
data = XMLDECL_RE.sub('', data)
|
||||
data = data.replace('http://openebook.org/namespaces/oeb-package/1.0',
|
||||
OPF1_NS)
|
||||
try:
|
||||
opf = etree.fromstring(data)
|
||||
except etree.XMLSyntaxError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user