Skip to content

Commit 9e44173

Browse files
Copilotaaronpowell
andcommitted
Improve comment clarity for string escaping fix
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
1 parent fb5f22a commit 9e44173

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

website/src/scripts/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export function setupDropdownCloseHandlers(): void {
298298
export function getActionButtonsHtml(filePath: string, small = false): string {
299299
const btnClass = small ? 'btn-small' : '';
300300
const iconSize = small ? 14 : 16;
301-
// Escape backslashes first, then single quotes to prevent breaking out of string context
301+
// Escape backslashes first, then single quotes to prevent breaking out of the JavaScript string literal in the onclick attribute
302302
const escapedPath = filePath.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
303303

304304
return `

0 commit comments

Comments
 (0)