Skip to content

Commit f9612da

Browse files
committed
Fix escapeshellarg example to properly escape backslash
1 parent 756a62b commit f9612da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/exec/escapeshellarg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function escapeshellarg(arg) {
33
// + original by: Felix Geisendoerfer (http://www.debuggable.com/felix)
44
// + improved by: Brett Zamir (http://brett-zamir.me)
55
// * example 1: escapeshellarg("kevin's birthday");
6-
// * returns 1: "'kevin\'s birthday'"
6+
// * returns 1: "'kevin\\'s birthday'"
77
var ret = '';
88

99
ret = arg.replace(/[^\\]'/g, function(m, i, s) {

0 commit comments

Comments
 (0)