Filter palette using raw label not html formatted label

Fixes #2409
This commit is contained in:
Nick O'Leary 2020-02-07 16:31:59 +00:00
parent 7d32636133
commit a05589c5a6
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 4 additions and 1 deletions

View File

@ -92,8 +92,11 @@ RED.palette = (function() {
var lineHeight = 20;
var portHeight = 10;
el.attr("data-palette-label",label);
label = RED.utils.sanitize(label);
var words = label.split(/[ -]/);
var displayLines = [];
@ -469,7 +472,7 @@ RED.palette = (function() {
function filterChange(val) {
var re = new RegExp(val.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'),'i');
$("#red-ui-palette-container .red-ui-palette-node").each(function(i,el) {
var currentLabel = $(el).find(".red-ui-palette-label").text();
var currentLabel = $(el).attr("data-palette-label");
var type = $(el).attr("data-palette-type");
if (val === "" || re.test(type) || re.test(currentLabel)) {
$(this).show();