diff --git a/js/ndnProtocol/components/ndnProtocolService.js b/js/ndnProtocol/components/ndnProtocolService.js
index ca8cc1b..69e0675 100644
--- a/js/ndnProtocol/components/ndnProtocolService.js
+++ b/js/ndnProtocol/components/ndnProtocolService.js
@@ -30,12 +30,9 @@
     newURI: function(aSpec, aOriginCharset, aBaseURI)
     {
         // We have to trim now because nsIURI converts spaces to %20 and we can't trim in newChannel.
-        var spec = aSpec.trim();
-        var preSearch = spec.split('?', 1)[0];
-        var searchAndHash = spec.substr(preSearch.length).trim();
-
+        var uriParts = splitUri(aSpec);
         var uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
-        uri.spec = preSearch.trim() + searchAndHash;
+        uri.spec = uriParts.protocol + uriParts.name + uriParts.search + uriParts.hash;
         return uri;
     },
 
@@ -44,21 +41,12 @@
         var thisNdnProtocol = this;
         
         try {            
-            // Decode manually since nsIURI doesn't have selectors for hash, etc.
-            var spec = aURI.spec.trim();
-            var preHash = spec.split('#', 1)[0];
-            var hash = spec.substr(preHash.length).trim();
-            var preSearch = preHash.split('?', 1)[0];
-            var search = preHash.substr(preSearch.length).trim();
-            // Set nameString to the preSearch without the protocol.
-            var nameString = preSearch.trim();
-            if (nameString.indexOf(':') >= 0)
-                nameString = nameString.substr(nameString.indexOf(':') + 1).trim();
+            var uriParts = splitUri(aURI.spec);
     
             var template = new Interest(new Name([]));
             // Use the same default as NDN.expressInterest.
             template.interestLifetime = 4000; // milliseconds
-            var searchWithoutNdn = extractNdnSearch(search, template);
+            var searchWithoutNdn = extractNdnSearch(uriParts.search, template);
             
             var segmentTemplate = new Interest(new Name([]));
             // Only use the interest selectors which make sense for fetching further segments.
@@ -67,14 +55,14 @@
             segmentTemplate.interestLifetime = template.interestLifetime;
     
             var requestContent = function(contentListener) {                
-                var name = new Name(nameString);
+                var name = new Name(uriParts.name);
                 // TODO: Strip off an ending implicit digest before checking the last component?
                 var uriEndsWithSegmentNumber = endsWithSegmentNumber(name);
                 
                 // Use the same NDN object each time.
                 thisNdnProtocol.ndn.expressInterest(name, 
                     new ContentClosure(thisNdnProtocol.ndn, contentListener, uriEndsWithSegmentNumber, 
-                            aURI.originCharset, searchWithoutNdn + hash, segmentTemplate),
+                            aURI.originCharset, searchWithoutNdn + uriParts.hash, segmentTemplate),
                     template);
             };
 
diff --git a/js/ndnProtocol/content/ndnToolbar.js b/js/ndnProtocol/content/ndnToolbar.js
index 20518a3..129913a 100644
--- a/js/ndnProtocol/content/ndnToolbar.js
+++ b/js/ndnProtocol/content/ndnToolbar.js
@@ -8,17 +8,8 @@
   }
 
   // Parse the same as in ndnProtocolService newChannel.
-  var spec = window._content.document.location.href.trim();
-  var preHash = spec.split('#', 1)[0];
-  var hash = spec.substr(preHash.length).trim();
-  var preSearch = preHash.split('?', 1)[0];
-  var search = preHash.substr(preSearch.length).trim();
-  // Set nameString to the preSearch without the protocol.
-  var nameString = preSearch.trim();
-  if (nameString.indexOf(':') >= 0)
-    nameString = nameString.substr(nameString.indexOf(':') + 1).trim();
-
-  var name = new Name(nameString);
+  var uriParts = splitUri(window._content.document.location.href);
+  var name = new Name(uriParts.name);
   var indexOfVersion = getIndexOfVersion(name);
   if (indexOfVersion < 0) {
     alert("The ndn address does not have a version");
@@ -26,9 +17,10 @@
   }
 
   var nameWithoutVersion = new Name(name.components.slice(0, indexOfVersion));
-  var searchWithChildSelector = (search == "" ? "?" : search + "&") + "ndn.ChildSelector=1";
+  var searchWithChildSelector = 
+      (uriParts.search == "" ? "?" : uriParts.search + "&") + "ndn.ChildSelector=1";
     
-  var uri = "ndn:" + nameWithoutVersion.to_uri() + searchWithChildSelector + hash;
+  var uri = "ndn:" + nameWithoutVersion.to_uri() + searchWithChildSelector + uriParts.hash;
   window._content.document.location = uri;
 } 
 
diff --git a/js/ndnProtocol/modules/NdnProtocolInfo.jsm b/js/ndnProtocol/modules/NdnProtocolInfo.jsm
index a2fb10d..bf8bf55 100644
--- a/js/ndnProtocol/modules/NdnProtocolInfo.jsm
+++ b/js/ndnProtocol/modules/NdnProtocolInfo.jsm
@@ -3,7 +3,7 @@
  * See COPYING for copyright and distribution information.
  */
 
-var EXPORTED_SYMBOLS = ["addNdnHubChangedListener", "setConnectedNdnHub"];
+var EXPORTED_SYMBOLS = ["addNdnHubChangedListener", "setConnectedNdnHub", "splitUri"];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
@@ -51,4 +51,32 @@
             // Ignore error from the listener.
         }
     }
+}
+
+/*
+ * Split the URI spec and return an object with protocol (including ':'), name, 
+ *   search (including '?') and hash value (including '#').  
+ * All result strings are trimmed.  This does not unescape the name.
+ * The name may include a host and port.  
+ */
+function splitUri(spec) {
+    spec = spec.trim();
+    var result = {};
+    var preHash = spec.split('#', 1)[0];
+    result.hash = spec.substr(preHash.length).trim();
+    var preSearch = preHash.split('?', 1)[0];
+    result.search = preHash.substr(preSearch.length).trim();
+    
+    preSearch = preSearch.trim();
+    var colonIndex = preSearch.indexOf(':');
+    if (colonIndex >= 0) {
+        result.protocol = preSearch.substr(0, colonIndex + 1).trim();
+        result.name = preSearch.substr(colonIndex + 1).trim();    
+    }
+    else {
+        result.protocol = "";
+        result.name = preSearch;
+    }
+    
+    return result;
 }
\ No newline at end of file
