Skip to content

Commit

Permalink
allow etree.XMLParser to resolve external entities
Browse files Browse the repository at this point in the history
We use XML external (file) entities to include .rst files for the help section in tool XMLs. U ntil recently this wasn't a problem, but the default in lxml was recently changed and there is no way in planemo linting or testing to set this flag for the XMLParser. 

This change mainly makes parse_xml() use the old default.
  • Loading branch information
jancrichter authored Feb 20, 2024
1 parent 0d380c4 commit c8721ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def parse_xml(
if remove_comments and LXML_AVAILABLE:
# If using stdlib etree comments are always removed,
# but lxml doesn't do this by default
parser = etree.XMLParser(remove_comments=remove_comments)
parser = etree.XMLParser(remove_comments=remove_comments, resolve_entities=True)

if LXML_AVAILABLE and schemafname:
with open(str(schemafname), "rb") as schema_file:
Expand Down

0 comments on commit c8721ea

Please sign in to comment.