Skip to content

Commit

Permalink
Set jinja2 autoescape. Closes #424
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Ernst committed Dec 16, 2024
1 parent 26e566f commit 1bceb8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/feditest/testruntranscriptserializer/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def __init__(self, template_path: str):
self.template_path = [ os.path.join(os.path.dirname(__file__), "templates/testplantranscript_default") ]

self.jinja2_env = jinja2.Environment(
loader=jinja2.FileSystemLoader(self.template_path)
loader=jinja2.FileSystemLoader(self.template_path),
autoescape=jinja2.select_autoescape()
)
self.jinja2_env.filters["regex_sub"] = lambda s, pattern, replacement: re.sub(
pattern, replacement, s
Expand Down

0 comments on commit 1bceb8d

Please sign in to comment.