Commit 8346c7bd authored by Jos Schellevis's avatar Jos Schellevis

Add escape charaters for to

parent 66265c97
......@@ -479,17 +479,17 @@
},
tokenRemove: function(value){
var option = $('option[value="' + value.replace('\\','\\\\') + '"]', this.select);
var new_value=value.replace(/\\/g,'\\\\').replace(/\*/g,'\\*'); // add escape character
var option = $('option[value="' + new_value + '"]', this.select);
if(option.attr('data-type') == 'custom'){
option.remove();
} else {
option.removeAttr('selected');
}
$('li.Token[data-value="' + value.replace('\\','\\\\') + '"]', this.tokensContainer).remove();
$('li.Token[data-value="' + new_value + '"]', this.tokensContainer).remove();
this.options.onRemoveToken(value.replace('\\','\\\\') );
this.options.onRemoveToken(new_value );
this.resizeSearchInput();
this.dropdownHide();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment