Skip to content

Commit

Permalink
Fix code scanning alert no. 17: Jinja2 templating with autoescape=False
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ad5a2b1 commit 7462bc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pds/registry/utils/treks/product_collection_builder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utility for creating Product_Collection PDS4 xml."""
import importlib.resources

from jinja2 import Environment
from jinja2 import Environment, select_autoescape
from pds.registry.utils.treks import templates


Expand All @@ -13,7 +13,7 @@ def create_collection_pds4(target):
:return: Product_Collection PDS4 xml
"""
# create env
env = Environment()
env = Environment(autoescape=select_autoescape(['html', 'xml']))

with importlib.resources.open_text(templates, "product-collection-template.xml") as io:
template_text = io.read()
Expand Down

0 comments on commit 7462bc0

Please sign in to comment.