diff --git a/changelog.d/8.fixing.md b/changelog.d/8.fixing.md new file mode 100644 index 0000000..54cb05a --- /dev/null +++ b/changelog.d/8.fixing.md @@ -0,0 +1 @@ +Disabled Jinja2 'autoescape' feature since it can produce incorrect output. \ No newline at end of file diff --git a/src/jinjanator/cli.py b/src/jinjanator/cli.py index f316220..94b0a00 100644 --- a/src/jinjanator/cli.py +++ b/src/jinjanator/cli.py @@ -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)