Skip to content

Commit f437b2f

Browse files
author
Test
committed
fix: escape script args using String.fromCharCode to appease lint
Change-Id: Id7a6299a19092c9e4b93e765bafdc3b5f19ee809 Signed-off-by: Test <test@example.com>
1 parent 654611e commit f437b2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/services/ipcMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ export class IpcMain {
12791279

12801280
const escapedArgs = args
12811281
.map((arg) => {
1282-
const safeArg = arg.replace(/"/g, '\\"');
1282+
const safeArg = arg.replace(/"/g, `${String.fromCharCode(92)}"`);
12831283
return `"${safeArg}"`;
12841284
})
12851285
.join(" ");

0 commit comments

Comments
 (0)