mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 18:32:45 +01:00
Return punycoded hostname in static extended filtering
This commit is contained in:
parent
08eb790145
commit
df7bedbe04
@ -186,7 +186,6 @@ SelectorCacheEntry.junkyard = [];
|
|||||||
// Specific filers can be enforced before the main document is loaded.
|
// Specific filers can be enforced before the main document is loaded.
|
||||||
|
|
||||||
const FilterContainer = function() {
|
const FilterContainer = function() {
|
||||||
this.reHasUnicode = /[^\x00-\x7F]/;
|
|
||||||
this.rePlainSelector = /^[#.][\w\\-]+/;
|
this.rePlainSelector = /^[#.][\w\\-]+/;
|
||||||
this.rePlainSelectorEscaped = /^[#.](?:\\[0-9A-Fa-f]+ |\\.|\w|-)+/;
|
this.rePlainSelectorEscaped = /^[#.](?:\\[0-9A-Fa-f]+ |\\.|\w|-)+/;
|
||||||
this.rePlainSelectorEx = /^[^#.\[(]+([#.][\w-]+)|([#.][\w-]+)$/;
|
this.rePlainSelectorEx = /^[^#.\[(]+([#.][\w-]+)|([#.][\w-]+)$/;
|
||||||
|
@ -2984,6 +2984,12 @@ const ExtOptionsIterator = class {
|
|||||||
}
|
}
|
||||||
if ( i === i0 ) { value.bad = true; }
|
if ( i === i0 ) { value.bad = true; }
|
||||||
value.hn = parser.raw.slice(slices[i0+1], slices[i+1]);
|
value.hn = parser.raw.slice(slices[i0+1], slices[i+1]);
|
||||||
|
if (
|
||||||
|
hasBits(this.parser.allBits, BITUnicode) &&
|
||||||
|
parser.reUnicodeChar.test(value.hn)
|
||||||
|
) {
|
||||||
|
value.hn = parser.normalizeHostnameValue(value.hn, 0b0110);
|
||||||
|
}
|
||||||
if ( i < this.r ) { i += 3; }
|
if ( i < this.r ) { i += 3; }
|
||||||
this.l = i;
|
this.l = i;
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user