mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
further fix #2950: FF56 also suffers non-punycoded URLs
This commit is contained in:
parent
8116afabc4
commit
40cfd1505e
@ -32,7 +32,7 @@ vAPI.net.registerListeners = function() {
|
||||
// https://github.com/gorhill/uBlock/issues/2950
|
||||
// Firefox 55 does not normalize URLs to ASCII, uBO must do this itself.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=945240
|
||||
var belowFirefox56 = false;
|
||||
var mustPunycode = false;
|
||||
(function() {
|
||||
if (
|
||||
typeof browser === 'object' &&
|
||||
@ -41,8 +41,8 @@ vAPI.net.registerListeners = function() {
|
||||
typeof browser.runtime.getBrowserInfo === 'function'
|
||||
) {
|
||||
browser.runtime.getBrowserInfo().then(info => {
|
||||
belowFirefox56 = info.name === 'Firefox' &&
|
||||
/^5[0-5]\./.test(info.version);
|
||||
mustPunycode = info.name === 'Firefox' &&
|
||||
/^5[0-6]\./.test(info.version);
|
||||
});
|
||||
}
|
||||
})();
|
||||
@ -100,7 +100,7 @@ vAPI.net.registerListeners = function() {
|
||||
details.tabId = details.tabId.toString();
|
||||
|
||||
if (
|
||||
belowFirefox56 === true &&
|
||||
mustPunycode === true &&
|
||||
reMustNormalizeHostname.test(details.url) === true
|
||||
) {
|
||||
parsedURL.href = details.url;
|
||||
|
Loading…
Reference in New Issue
Block a user