diff options
author | gorhill <rhill@raymondhill.net> | 2015-10-13 10:56:59 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-10-13 10:56:59 -0400 |
commit | 2fdb63c98a2a6518f04039b50f70c5346dddcf9f (patch) | |
tree | c8dc272847eb487bcfb803f362ad8ce8b9a9bc46 | |
parent | 911ea2f85e3fb5894d9fa62dc6e45df9e68116da (diff) | |
download | uBlock-2fdb63c98a2a6518f04039b50f70c5346dddcf9f.zip uBlock-2fdb63c98a2a6518f04039b50f70c5346dddcf9f.tar.gz uBlock-2fdb63c98a2a6518f04039b50f70c5346dddcf9f.tar.bz2 |
this fixes #806
-rw-r--r-- | src/js/document-blocked.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/js/document-blocked.js b/src/js/document-blocked.js index 5b1c469..c64954a 100644 --- a/src/js/document-blocked.js +++ b/src/js/document-blocked.js @@ -193,12 +193,9 @@ uDom.nodeFromId('why').textContent = details.fs; }; var renderParams = function(parentNode, rawURL) { - var url = null; - try { - url = new URL(rawURL); - } catch(ex) { - } - if ( url === null || url.search.length === 0 ) { + var a = document.createElement('a'); + a.href = rawURL; + if ( a.search.length === 0 ) { return false; } @@ -209,7 +206,7 @@ uDom.nodeFromId('why').textContent = details.fs; ); parentNode.appendChild(li); - var params = url.search.slice(1).split('&'); + var params = a.search.slice(1).split('&'); var param, name, value, ul; for ( var i = 0; i < params.length; i++ ) { param = params[i]; |