fixed that escaping thing i think

This commit is contained in:
Peter Cottle 2012-10-20 23:20:23 -07:00
parent ea3fe2f3eb
commit 46632988cf
2 changed files with 4 additions and 3 deletions

View file

@ -168,14 +168,14 @@ var CommandPromptView = Backbone.View.extend({
// split commands on semicolon
_.each(value.split(';'), _.bind(function(command, index) {
command = _.escape(command);
command = command
.replace(/^(\s+)/, '')
.replace(/(\s+)$/, '')
.replace(/"/g, '"')
.replace(/'/g, "'");
command = _.escape(command);
if (index > 0 && !command.length) {
return;
}