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

Unified Diff: lib/filterClasses.js

Issue 29801555: Noissue - Check only first two characters for exception marker (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 7, 2018, 9:22 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -721,17 +721,17 @@
* Creates a RegExp filter from its text representation
* @param {string} text same as in Filter()
* @return {Filter}
*/
RegExpFilter.fromText = function(text)
{
let blocking = true;
let origText = text;
- if (text.indexOf("@@") == 0)
+ if (text[0] == "@" && text[1] == "@")
{
blocking = false;
text = text.substr(2);
}
let contentType = null;
let matchCase = null;
let domains = null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld