Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterComposer.js

Issue 29772555: Issue 6647 - Stop converting domains from punycode to unicode (Closed)
Patch Set: Created May 6, 2018, 2:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/filterComposer.js
===================================================================
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -23,7 +23,7 @@
const {RegExpFilter} = require("../adblockpluscore/lib/filterClasses");
const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier");
const {Prefs} = require("./prefs");
-const {extractHostFromFrame, stringifyURL, isThirdParty} = require("./url");
+const {extractHostFromFrame, isThirdParty} = require("./url");
const {getKey, checkWhitelisted} = require("./whitelisting");
const {port} = require("./messaging");
const info = require("../buildtools/info");
@@ -104,17 +104,15 @@
for (let url of details.urls)
{
let urlObj = new URL(url, details.baseURL);
- url = stringifyURL(urlObj);
-
let filter = defaultMatcher.whitelist.matchesAny(
- url, typeMask, docDomain,
+ urlObj.href, typeMask, docDomain,
isThirdParty(urlObj, docDomain),
getKey(page, frame), specificOnly
);
if (!filter)
{
- let filterText = url.replace(/^[\w-]+:\/+(?:www\.)?/, "||");
+ let filterText = urlObj.href.replace(/^[\w-]+:\/+(?:www\.)?/, "||");
if (specificOnly)
filterText += "$domain=" + docDomain;

Powered by Google App Engine
This is Rietveld