Skip to content

Commit 12e12f5

Browse files
committed
refactor: Template literal string concat in escapeShellArg function
1 parent 1e2376f commit 12e12f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/dockerMailserver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function debugLog(message, data = null) {
3131
function escapeShellArg(arg) {
3232
// Replace single quotes with '\'' (end quote, escaped quote, start quote)
3333
// Then wrap the entire string in single quotes
34-
return "'" + arg.replace(/'/g, "'\\''") + "'";
34+
return `'${arg.replace(/'/g, "'\\''")}'`;
3535
}
3636

3737
/**

0 commit comments

Comments
 (0)