Improve comment clarity for string escaping fix

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-02 05:07:06 +00:00
parent fb5f22a6b2
commit 9e44173f94

View File

@@ -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 `