mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update shell.js
This commit is contained in:
parent
8b4e2c1e66
commit
d366427b62
|
@ -51,8 +51,9 @@ var ShellObject = function() {
|
||||||
return cmd;
|
return cmd;
|
||||||
} else if (typeof(cmd) === "object") {
|
} else if (typeof(cmd) === "object") {
|
||||||
return cmd.map(function(s) {
|
return cmd.map(function(s) {
|
||||||
var regex = /[ "]/g;
|
if (s == '') {
|
||||||
if (!regex.test(s)) {
|
return "''";
|
||||||
|
} else if (!/[ "]/g.test(s)) {
|
||||||
return s;
|
return s;
|
||||||
} else {
|
} else {
|
||||||
return "\"" + addslashes(s) + "\"";
|
return "\"" + addslashes(s) + "\"";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user