Skip to content

Commit

Permalink
Disable Jinja2 'autoescape' feature since it can produce broken output.
Browse files Browse the repository at this point in the history
Closes #8.
  • Loading branch information
kpfleming committed Jul 22, 2023
1 parent c8a60a7 commit 9e5a1e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/8.fixing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disabled Jinja2 'autoescape' feature since it can produce incorrect output.
2 changes: 1 addition & 1 deletion src/jinjanator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
j2_env_params.setdefault("extensions", self.ENABLED_EXTENSIONS)
j2_env_params.setdefault("loader", FilePathLoader(cwd))

self._env = jinja2.Environment(**j2_env_params, autoescape=True)
self._env = jinja2.Environment(**j2_env_params, autoescape=False) # noqa: S701

for plugin_globals in plugin_hook_callers.plugin_globals():
self._env.globals.update(plugin_globals)
Expand Down

0 comments on commit 9e5a1e4

Please sign in to comment.