mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
fix #1757
This commit is contained in:
parent
541b850b54
commit
c14277f5aa
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
uBlock - a browser extension to block requests.
|
uBlock Origin - a browser extension to block requests.
|
||||||
Copyright (C) 2014-2015 Raymond Hill
|
Copyright (C) 2014-2016 Raymond Hill
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -22,12 +22,12 @@
|
|||||||
/* jshint bitwise: false */
|
/* jshint bitwise: false */
|
||||||
/* global punycode */
|
/* global punycode */
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
µBlock.staticNetFilteringEngine = (function(){
|
µBlock.staticNetFilteringEngine = (function(){
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var µb = µBlock;
|
var µb = µBlock;
|
||||||
@ -1541,7 +1541,10 @@ FilterParser.prototype.parse = function(raw) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// plain hostname? (from ABP filter list)
|
// plain hostname? (from ABP filter list)
|
||||||
if ( this.reHostnameRule2.test(s) ) {
|
// https://github.com/gorhill/uBlock/issues/1757
|
||||||
|
// A filter can't be a pure-hostname one if there is a domain option
|
||||||
|
// present.
|
||||||
|
if ( this.domainOpt === '' && this.reHostnameRule2.test(s) ) {
|
||||||
this.f = s.replace(this.reCleanupHostnameRule2, '');
|
this.f = s.replace(this.reCleanupHostnameRule2, '');
|
||||||
this.hostnamePure = true;
|
this.hostnamePure = true;
|
||||||
return this;
|
return this;
|
||||||
@ -1941,9 +1944,11 @@ FilterContainer.prototype.compile = function(raw, out) {
|
|||||||
|
|
||||||
FilterContainer.prototype.compileHostnameOnlyFilter = function(parsed, out) {
|
FilterContainer.prototype.compileHostnameOnlyFilter = function(parsed, out) {
|
||||||
// Can't fit the filter in a pure hostname dictionary.
|
// Can't fit the filter in a pure hostname dictionary.
|
||||||
if ( parsed.domainOpt.length !== 0 ) {
|
// https://github.com/gorhill/uBlock/issues/1757
|
||||||
return;
|
// This should no longer happens with fix to above issue.
|
||||||
}
|
//if ( parsed.domainOpt.length !== 0 ) {
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
var party = AnyParty;
|
var party = AnyParty;
|
||||||
if ( parsed.firstParty !== parsed.thirdParty ) {
|
if ( parsed.firstParty !== parsed.thirdParty ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user