From 6a11057315368354e1f14ac736973c94a321a07a Mon Sep 17 00:00:00 2001 From: Oliver Stanley Date: Tue, 1 Apr 2025 11:44:55 +0100 Subject: [PATCH] enable autoescape in jinja2 environment --- .../report/presentation/flavours/html/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ydata_profiling/report/presentation/flavours/html/templates.py b/src/ydata_profiling/report/presentation/flavours/html/templates.py index 85e24a46a..565e74889 100644 --- a/src/ydata_profiling/report/presentation/flavours/html/templates.py +++ b/src/ydata_profiling/report/presentation/flavours/html/templates.py @@ -12,7 +12,7 @@ "ydata_profiling", "report/presentation/flavours/html/templates" ) jinja2_env = jinja2.Environment( - lstrip_blocks=True, trim_blocks=True, loader=package_loader + lstrip_blocks=True, trim_blocks=True, loader=package_loader, autoescape=jinja2.select_autoescape() ) jinja2_env.filters["is_list"] = lambda x: isinstance(x, list) jinja2_env.filters["fmt_badge"] = fmt_badge