From a367c3b4b8e928b1f241487d789babbbf3e47e1f Mon Sep 17 00:00:00 2001 From: Tom Herrmann Date: Mon, 11 Jul 2022 12:27:12 +0200 Subject: [PATCH] Fix escaping for exceptions in normal web ui (related to #2126) --- locust/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locust/web.py b/locust/web.py index 7790115984..f5bba1b225 100644 --- a/locust/web.py +++ b/locust/web.py @@ -355,8 +355,8 @@ def exceptions() -> Response: "exceptions": [ { "count": row["count"], - "msg": row["msg"], - "traceback": row["traceback"], + "msg": escape(row["msg"]), + "traceback": escape(row["traceback"]), "nodes": ", ".join(row["nodes"]), } for row in (environment.runner.exceptions.values() if environment.runner is not None else [])