mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 16:47:15 +02:00
Use native Punycode conversion (#3854)
This commit is contained in:
parent
430537632c
commit
f316a326cf
@ -29,11 +29,10 @@ import { createRequire } from 'module';
|
||||
|
||||
import { readFileSync } from 'fs';
|
||||
import { dirname, resolve } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { domainToASCII, fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
import punycode from './lib/punycode.js';
|
||||
import publicSuffixList from './lib/publicsuffixlist/publicsuffixlist.js';
|
||||
|
||||
import snfe from './js/static-net-filtering.js';
|
||||
@ -76,7 +75,7 @@ async function enableWASM() {
|
||||
|
||||
function pslInit(raw) {
|
||||
if ( typeof raw === 'string' && raw.trim() !== '' ) {
|
||||
publicSuffixList.parse(raw, punycode.toASCII);
|
||||
publicSuffixList.parse(raw, domainToASCII);
|
||||
return publicSuffixList;
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ function pslInit(raw) {
|
||||
console.error('Unable to populate public suffix list');
|
||||
return;
|
||||
}
|
||||
publicSuffixList.parse(raw, punycode.toASCII);
|
||||
publicSuffixList.parse(raw, domainToASCII);
|
||||
return publicSuffixList;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user