diff --git a/resource/js/hierarchy.js b/resource/js/hierarchy.js
index e48232a2c..0cd11141d 100644
--- a/resource/js/hierarchy.js
+++ b/resource/js/hierarchy.js
@@ -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 '12.3 Hello'
- var label = $(node.text.toLowerCase()).filter('.tree-label').text();
+ var label = $($.parseHTML(node.text.toLowerCase())).filter('.tree-label').text();
return domain + " " + label;
}