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 `