3 var escapeArgument = require('./escapeArgument');
5 function escapeCommand(command) {
6 // Do not escape if this command is not dangerous..
7 // We do this so that commands like "echo" or "ifconfig" work
8 // Quoting them, will make them unaccessible
9 return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true);
12 module.exports = escapeCommand;