From a33dc4f8e21e45db3f5120e631082f93686711a6 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 16 Jun 2016 09:46:18 -0400 Subject: [PATCH] fix #1725 (assuming the issue was uBO not properly blocking `data:` images) --- src/js/contentscript-end.js | 3 --- src/js/messaging.js | 6 ------ src/js/scriptlets/element-picker.js | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 79c1cbc75..894dd605b 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -204,9 +204,6 @@ var uBlockCollapser = (function() { return; } } - if ( src.lastIndexOf('http', 0) !== 0 ) { - return; - } var req = new PendingRequest(target, tagName, prop); newRequests.push(new BouncingRequest(req.id, tagName, src)); }; diff --git a/src/js/messaging.js b/src/js/messaging.js index 9f2ee3c4b..0f4b8555a 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -491,12 +491,6 @@ var filterRequests = function(pageStore, details) { while ( i-- ) { request = requests[i]; context.requestURL = punycodeURL(request.url); - // https://github.com/gorhill/uBlock/issues/978 - // Ignore invalid URLs: these would not occur on the HTTP - // observer side. - if ( (context.requestHostname = hostnameFromURI(request.url)) === '' ) { - continue; - } context.requestType = tagNameToRequestTypeMap[request.tagName]; r = pageStore.filterRequest(context); if ( typeof r !== 'string' || r.charAt(1) !== 'b' ) { diff --git a/src/js/scriptlets/element-picker.js b/src/js/scriptlets/element-picker.js index b48c41e79..e53a7f711 100644 --- a/src/js/scriptlets/element-picker.js +++ b/src/js/scriptlets/element-picker.js @@ -344,13 +344,13 @@ var resourceURLFromElement = function(elem) { if ( (s = netFilter1stSources[tagName]) ) { s = elem[s]; if ( typeof s === 'string' && s !== '' ) { - return s.slice(0, 2048); + return s.slice(0, 1024); } } if ( (s = netFilter2ndSources[tagName]) ) { s = elem[s]; if ( typeof s === 'string' && s !== '' ) { - return s.slice(0, 2048); + return s.slice(0, 1024); } } return backgroundImageURLFromElement(elem);