diff --git a/static/routing-tree.js b/static/routing-tree.js
index ff5940cfe28fd73b1c994700f7e9f35f3e754cf4..9e8c42bd949a506faa8834ebc3b7fc78b8245c32 100644
--- a/static/routing-tree.js
+++ b/static/routing-tree.js
@@ -26,10 +26,10 @@ var tooltip = d3.select("body")
     .style("visibility", "hidden");
 
 function parseSearch(searchString) {
-  var labels = searchString.replace(/{|}|\"|\'|\s/g, "").split(",");
+  var labels = searchString.replace(/{|}|\"|\'/g, "").split(",");
   var o = {};
   labels.forEach(function(label) {
-    var l = label.split("=");
+    var l = label.trim().split("=");
     o[l[0]] = l[1];
   });
   return o;