1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-22 10:22:51 +01:00

Return punycoded hostname in static extended filtering

This commit is contained in:
Raymond Hill 2022-10-24 09:08:50 -04:00
parent 08eb790145
commit df7bedbe04
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 6 additions and 1 deletions

View File

@ -186,7 +186,6 @@ SelectorCacheEntry.junkyard = [];
// Specific filers can be enforced before the main document is loaded.
const FilterContainer = function() {
this.reHasUnicode = /[^\x00-\x7F]/;
this.rePlainSelector = /^[#.][\w\\-]+/;
this.rePlainSelectorEscaped = /^[#.](?:\\[0-9A-Fa-f]+ |\\.|\w|-)+/;
this.rePlainSelectorEx = /^[^#.\[(]+([#.][\w-]+)|([#.][\w-]+)$/;

View File

@ -2984,6 +2984,12 @@ const ExtOptionsIterator = class {
}
if ( i === i0 ) { value.bad = true; }
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; }
this.l = i;
return this;