mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont resolve entities in the RECOVER_PARSER
This commit is contained in:
parent
631f266270
commit
d102aca175
@ -19,10 +19,9 @@ from calibre.utils.localization import canonicalize_lang
|
||||
from calibre.utils.logging import default_log
|
||||
from calibre.utils.zipfile import ZipFile
|
||||
from calibre.utils.xml_parse import safe_xml_fromstring
|
||||
from calibre.ebooks.oeb.parse_utils import RECOVER_PARSER
|
||||
|
||||
|
||||
def fromstring(raw, parser=RECOVER_PARSER):
|
||||
def fromstring(raw, parser=None):
|
||||
return safe_xml_fromstring(raw)
|
||||
|
||||
# Read metadata {{{
|
||||
|
@ -16,7 +16,7 @@ from calibre.constants import filesystem_encoding
|
||||
from calibre.ebooks.chardet import xml_to_unicode, strip_encoding_declarations
|
||||
from polyglot.builtins import iteritems, itervalues, unicode_type, string_or_bytes, map
|
||||
|
||||
RECOVER_PARSER = etree.XMLParser(recover=True, no_network=True)
|
||||
RECOVER_PARSER = etree.XMLParser(recover=True, no_network=True, resolve_entities=False)
|
||||
XHTML_NS = 'http://www.w3.org/1999/xhtml'
|
||||
XMLNS_NS = 'http://www.w3.org/2000/xmlns/'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user