mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
70cdd100aa
commit
25fc478490
@ -470,7 +470,8 @@ class OPF(object):
|
||||
raise ValueError('Empty file: '+getattr(stream, 'name', 'stream'))
|
||||
self.basedir = self.base_dir = basedir
|
||||
self.path_to_html_toc = self.html_toc_fragment = None
|
||||
raw, self.encoding = xml_to_unicode(raw, strip_encoding_pats=True, resolve_entities=True)
|
||||
raw, self.encoding = xml_to_unicode(raw, strip_encoding_pats=True,
|
||||
resolve_entities=True, assume_utf8=True)
|
||||
raw = raw[raw.find('<'):]
|
||||
self.root = etree.fromstring(raw, self.PARSER)
|
||||
self.metadata = self.metadata_path(self.root)
|
||||
|
Loading…
x
Reference in New Issue
Block a user