1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00
This commit is contained in:
gorhill 2017-05-09 08:58:30 -04:00
parent 1c7c703d8b
commit ea47cae003
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1443,10 +1443,13 @@ FilterParser.prototype.parse = function(raw) {
s = s.slice(2);
// convert hostname to punycode if needed
// https://github.com/gorhill/uBlock/issues/2599
if ( this.reHasUnicode.test(s) ) {
var matches = this.reIsolateHostname.exec(s);
if ( matches ) {
s = matches[1] + punycode.toASCII(matches[2]) + matches[3];
s = (matches[1] !== undefined ? matches[1] : '') +
punycode.toASCII(matches[2]) +
matches[3];
//console.debug('µBlock.staticNetFilteringEngine/FilterParser.parse():', raw, '=', s);
}
}