Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ruff: Fix S701 Consider using `autoescape=True`.

Anders Kaseorgd9182775c38d
diff --git a/zproject/jinja2/__init__.py b/zproject/jinja2/__init__.py
index e9768bc4235..e4ff5b02bdc 100644
--- a/zproject/jinja2/__init__.py
+++ b/zproject/jinja2/__init__.py
@@ -18,7 +18,7 @@ def json_dumps(obj: object) -> str:
def environment(**options: Any) -> Environment:
- env = Environment(**options)
+ env = Environment(autoescape=options.pop("autoescape", True), **options)
env.globals.update(
# default_page_params is provided here for responses where
# zulip_default_context is not run, including the 404.html and