We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb5f22a commit 9e44173Copy full SHA for 9e44173
1 file changed
website/src/scripts/utils.ts
@@ -298,7 +298,7 @@ export function setupDropdownCloseHandlers(): void {
298
export function getActionButtonsHtml(filePath: string, small = false): string {
299
const btnClass = small ? 'btn-small' : '';
300
const iconSize = small ? 14 : 16;
301
- // 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
302
const escapedPath = filePath.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
303
304
return `
0 commit comments