Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code scanning alert no. 17: Jinja2 templating with autoescape=False #344

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading