[FIX] tools: ignore unknown entities while parsing
This commit is contained in:
parent
2ae6481233
commit
e99358415a
|
@ -63,7 +63,10 @@ _logger = logging.getLogger(__name__)
|
|||
|
||||
# List of etree._Element subclasses that we choose to ignore when parsing XML.
|
||||
# We include the *Base ones just in case, currently they seem to be subclasses of the _* ones.
|
||||
SKIPPED_ELEMENT_TYPES = (etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase)
|
||||
SKIPPED_ELEMENT_TYPES = (etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase, etree._Entity)
|
||||
|
||||
# Configure default global parser
|
||||
etree.set_default_parser(etree.XMLParser(resolve_entities=False))
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Subprocesses
|
||||
|
|
Loading…
Reference in New Issue