[FIX] tools: ignore unknown entities while parsing

This commit is contained in:
Olivier Dony 2015-11-03 21:38:53 +01:00
parent 2ae6481233
commit e99358415a
1 changed files with 4 additions and 1 deletions

View File

@ -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