This commit is contained in:
gorhill 2016-08-16 12:12:35 -04:00
parent b3ffdb6b68
commit dbdc81aaf5
1 changed files with 10 additions and 3 deletions

View File

@ -644,9 +644,16 @@ vAPI.tabs.onPopupUpdated = (function() {
return ''; return '';
} }
// https://github.com/gorhill/uBlock/issues/1471 // https://github.com/gorhill/uBlock/issues/1471
// We test whether the opener hostname as at least one character // We test whether the opener hostname as at least one character
// within matched portion of URL. // within matched portion of URL.
return beg < pos + popunderHostname.length && end > pos ? result : ''; // https://github.com/gorhill/uBlock/issues/1903
// Ignore filters which cause a match before the start of the
// hostname in the URL.
return beg >= pos &&
beg < pos + popunderHostname.length &&
end > pos ?
result :
'';
}; };
var popunderMatch = function(openerURL, targetURL) { var popunderMatch = function(openerURL, targetURL) {