Skip to content

Commit

Permalink
Use explicit $.parseHTML() to avoid JS syntax error. Fixes #1270
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Apr 28, 2022
1 parent 712ead2 commit 8782ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resource/js/hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function nodeLabelSortKey(node) {

// parse the HTML code in node.text and return just the label as a lower case value for sorting
// should look like '<span class="tree-notation">12.3</span> <span class="tree-label">Hello</span>'
var label = $(node.text.toLowerCase()).filter('.tree-label').text();
var label = $($.parseHTML(node.text.toLowerCase())).filter('.tree-label').text();

return domain + " " + label;
}
Expand Down

0 comments on commit 8782ebb

Please sign in to comment.