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

Add escape charaters for to

parent 66265c97
...@@ -479,17 +479,17 @@ ...@@ -479,17 +479,17 @@
}, },
tokenRemove: function(value){ tokenRemove: function(value){
var new_value=value.replace(/\\/g,'\\\\').replace(/\*/g,'\\*'); // add escape character
var option = $('option[value="' + value.replace('\\','\\\\') + '"]', this.select); var option = $('option[value="' + new_value + '"]', this.select);
if(option.attr('data-type') == 'custom'){ if(option.attr('data-type') == 'custom'){
option.remove(); option.remove();
} else { } else {
option.removeAttr('selected'); 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.resizeSearchInput();
this.dropdownHide(); 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