Skip to content

Commit

Permalink
further fix #2950: FF56 also suffers non-punycoded URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Sep 2, 2017
1 parent 8116afa commit 40cfd15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions platform/webext/vapi-webrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' &&
Expand All @@ -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);
});
}
})();
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 40cfd15

Please sign in to comment.