better escaping

This commit is contained in:
Peter Cottle 2012-09-28 14:07:33 -07:00
parent 6e7e06277e
commit 09ca30b224
4 changed files with 59 additions and 12 deletions

View file

@ -70,6 +70,7 @@ var CommandPromptView = Backbone.View.extend({
_.each(value.split(';'), _.bind(function(command, index) {
command = command.replace(/^(\s+)/, '');
command = command.replace(/(\s+)$/, '');
command = _.escape(command);
if (index > 0 && !command.length) {
return;