From 2fdb63c98a2a6518f04039b50f70c5346dddcf9f Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 10:56:59 -0400 Subject: this fixes #806 --- src/js/document-blocked.js | 11 ++++------- 1 file 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]; -- cgit v1.1