mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
this fixes #1392
This commit is contained in:
parent
27c1005e59
commit
939b3a2d83
@ -43,7 +43,7 @@ var fromNetFilter = function(details) {
|
|||||||
var lists = [];
|
var lists = [];
|
||||||
|
|
||||||
var compiledFilter = details.compiledFilter;
|
var compiledFilter = details.compiledFilter;
|
||||||
var entry, content, pos, c;
|
var entry, content, pos, c
|
||||||
for ( var path in listEntries ) {
|
for ( var path in listEntries ) {
|
||||||
entry = listEntries[path];
|
entry = listEntries[path];
|
||||||
if ( entry === undefined ) {
|
if ( entry === undefined ) {
|
||||||
@ -54,8 +54,12 @@ var fromNetFilter = function(details) {
|
|||||||
if ( pos === -1 ) {
|
if ( pos === -1 ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// https://github.com/gorhill/uBlock/issues/835
|
|
||||||
// We need an exact match.
|
// We need an exact match.
|
||||||
|
// https://github.com/gorhill/uBlock/issues/1392
|
||||||
|
if ( pos !== 0 && reSpecialChars.test(content.charAt(pos - 1)) === false ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// https://github.com/gorhill/uBlock/issues/835
|
||||||
c = content.charAt(pos + compiledFilter.length);
|
c = content.charAt(pos + compiledFilter.length);
|
||||||
if ( c !== '' && reSpecialChars.test(c) === false ) {
|
if ( c !== '' && reSpecialChars.test(c) === false ) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user