From 9e44173f94741a72e438ae1ed1ca3208414f384e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 05:07:06 +0000 Subject: [PATCH] Improve comment clarity for string escaping fix Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- website/src/scripts/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/scripts/utils.ts b/website/src/scripts/utils.ts index 07f54d3d..e3027136 100644 --- a/website/src/scripts/utils.ts +++ b/website/src/scripts/utils.ts @@ -298,7 +298,7 @@ export function setupDropdownCloseHandlers(): void { export function getActionButtonsHtml(filePath: string, small = false): string { const btnClass = small ? 'btn-small' : ''; const iconSize = small ? 14 : 16; - // Escape backslashes first, then single quotes to prevent breaking out of string context + // Escape backslashes first, then single quotes to prevent breaking out of the JavaScript string literal in the onclick attribute const escapedPath = filePath.replace(/\\/g, '\\\\').replace(/'/g, "\\'"); return `