Skip to content

100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.

fix(first-reader): escape verdict_lead/verdict_rest before HTML insertion

Haris Chechi36bde7772f6a
diff --git a/agent_skills/first-reader/scripts/room.py b/agent_skills/first-reader/scripts/room.py
index 337e8066..e6592f77 100644
--- a/agent_skills/first-reader/scripts/room.py
+++ b/agent_skills/first-reader/scripts/room.py
@@ -373,8 +373,8 @@ def build(run_dir, out_path, ann):
page = (tpl.replace("@@TITLE@@", esc(ann.get("title", default_title)))
.replace("@@VERSION@@", VERSION)
.replace("@@STATS@@", stats_html)
- .replace("@@VERDICT_LEAD@@", verdict_lead)
- .replace("@@VERDICT_REST@@", verdict_rest)
+ .replace("@@VERDICT_LEAD@@", esc(verdict_lead))
+ .replace("@@VERDICT_REST@@", esc(verdict_rest))
.replace("@@PREVIOUS@@", prev_html)
.replace("@@PREVSCRUB@@", prevscrub_html)
.replace("@@N@@", str(n))