diff --git a/src/js/messaging.js b/src/js/messaging.js index 6076f8dc3..1e7c24b2d 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -533,6 +533,12 @@ var filterRequests = function(pageStore, details) { request = requests[i]; context.requestURL = vAPI.punycodeURL(request.url); context.requestHostname = µburi.hostnameFromURI(request.url); + // https://github.com/gorhill/uBlock/issues/978 + // Ignore invalid URLs: these would not occur on the HTTP + // observer side. + if ( context.requestHostname === '' ) { + continue; + } context.requestType = tagNameToRequestTypeMap[request.tagName]; if ( isBlockResult(pageStore.filterRequest(context)) ) { request.collapse = true;