mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #3497 (Error on converting zip containing htm files w/ index.htm)
This commit is contained in:
parent
089925ab1d
commit
d32a92123c
@ -14,7 +14,8 @@ XMLDECL_RE = re.compile(r'^\s*<[?]xml.*?[?]>')
|
||||
SVG_NS = 'http://www.w3.org/2000/svg'
|
||||
XLINK_NS = 'http://www.w3.org/1999/xlink'
|
||||
|
||||
convert_entities = functools.partial(entity_to_unicode, exceptions=['quot', 'apos', 'lt', 'gt', 'amp'])
|
||||
convert_entities = functools.partial(entity_to_unicode, exceptions=['quot',
|
||||
'apos', 'lt', 'gt', 'amp', '#60', '#62'])
|
||||
_span_pat = re.compile('<span.*?</span>', re.DOTALL|re.IGNORECASE)
|
||||
|
||||
|
||||
|
@ -845,6 +845,7 @@ class Manifest(object):
|
||||
if not namespace(data.tag):
|
||||
data.attrib['xmlns'] = XHTML_NS
|
||||
data = etree.tostring(data, encoding=unicode)
|
||||
|
||||
try:
|
||||
data = etree.fromstring(data)
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user