From da7398d5853cbfa1b8e832e8b907aab9aa281e6e Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 24 Jan 2015 17:17:44 -0500 Subject: [PATCH] this probably fixes #595 --- platform/safari/vapi-background.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/safari/vapi-background.js b/platform/safari/vapi-background.js index 10fdbf31f..6b13b74da 100644 --- a/platform/safari/vapi-background.js +++ b/platform/safari/vapi-background.js @@ -617,11 +617,9 @@ vAPI.net.registerListeners = function() { } if ( e.message.isURLWhiteListed ) { - block = µb.URI.hostnameFromURI(e.message.isURLWhiteListed); - block = µb.URI.domainFromHostname(block) || block; - - // TODO: revise, this can't work properly - e.message = !!µb.netWhitelist[block]; + // https://github.com/gorhill/uBlock/issues/595 + // Do not access µb.netWhitelist directly + e.message = !µb.getNetFilteringSwitch(e.message.isURLWhiteListed); return e.message; }