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

Unified Diff: lib/matcher.js

Issue 29996555: Noissue - Lower-case URL in advance for location-only filters (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Add JSDoc access tag Created Feb. 2, 2019, 10:54 a.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
« no previous file with comments | « lib/filterClasses.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/matcher.js
===================================================================
--- a/lib/matcher.js
+++ b/lib/matcher.js
@@ -312,22 +312,24 @@
{
// We need to skip the simple (location-only) filters if the type mask does
// not contain any default content types.
if ((typeMask & DEFAULT_TYPES) != 0)
{
let simpleSet = this._simpleFiltersByKeyword.get(keyword);
if (simpleSet)
{
+ let lowerCaseLocation = location.toLowerCase();
+
for (let filter of simpleSet)
{
if (specificOnly && !(filter instanceof WhitelistFilter))
continue;
- if (filter.matchesLocation(location))
+ if (filter.matchesLocation(location, lowerCaseLocation))
{
if (!collection)
return filter;
collection.push(filter);
}
}
}
« no previous file with comments | « lib/filterClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld