From 2db75b54a2904f762306a97101389e1f264f1843 Mon Sep 17 00:00:00 2001 From: Atlas Date: Thu, 2 Apr 2026 21:30:27 -0700 Subject: [PATCH] Potential fix for code scanning alert no. 15: Incomplete multi-character sanitization Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- extension/src/ui/contentCleaner.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/src/ui/contentCleaner.ts b/extension/src/ui/contentCleaner.ts index ec5b6d8..20e2922 100644 --- a/extension/src/ui/contentCleaner.ts +++ b/extension/src/ui/contentCleaner.ts @@ -144,6 +144,7 @@ export function cleanContentAnnotations(text: string): string { text = stripAnnotatedWrappers(text); text = text.replace(/Doc\(['"][\s\S]*?['"]\)/g, ''); text = text.replace(/<\w[\w.]*\s+object\s+at\s+0x[0-9a-f]+>/gi, ''); + text = text.replace(/]*>[\s\S]*?<\/script>/gi, ''); text = text.replace(/^\s*\*,?\s*$/gm, ''); text = text.replace(/\\n/g, '\n'); text = text.replace(/,\s*,/g, ',');