Support query selectors such as ?ccnx.ChildSelector=1 .
diff --git a/js/ccnxProtocol.xpi b/js/ccnxProtocol.xpi
index 11f3ed2..f1b730a 100644
--- a/js/ccnxProtocol.xpi
+++ b/js/ccnxProtocol.xpi
Binary files differ
diff --git a/js/ccnxProtocol/components/ccnxProtocolService.js b/js/ccnxProtocol/components/ccnxProtocolService.js
index ed6ea7e..7651764 100644
--- a/js/ccnxProtocol/components/ccnxProtocolService.js
+++ b/js/ccnxProtocol/components/ccnxProtocolService.js
@@ -27,8 +27,13 @@
 

     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 uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);

-        uri.spec = aSpec;

+        uri.spec = preSearch.trim() + searchAndHash;

         return uri;

     },

 

@@ -37,6 +42,7 @@
         var thisCcnxProtocol = 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();