Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
divinity76 authored Sep 22, 2020
1 parent 916f5b4 commit 04643e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/php/exec/escapeshellarg.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ module.exports = function escapeshellarg (arg) {

var ret = ''

ret = arg.replace(/[^\\]'/g, function (m, i, s) {
return m.slice(0, 1) + '\\\''
})
ret = arg.replace(/\'/g,'\'\\\'\'')

return "'" + ret + "'"
}

0 comments on commit 04643e5

Please sign in to comment.