Skip to content

Commit

Permalink
Filter palette using raw label not html formatted label
Browse files Browse the repository at this point in the history
Fixes #2409
  • Loading branch information
knolleary committed Feb 7, 2020
1 parent 7d32636 commit a05589c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a05589c

Please sign in to comment.