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

Unified Diff: lib/subscriptionClasses.js

Issue 29856560: Issue 6861 - Do not escape in-filter brackets during serialization (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Aug. 15, 2018, noon
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 | test/data/patterns.ini » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/subscriptionClasses.js
===================================================================
--- a/lib/subscriptionClasses.js
+++ b/lib/subscriptionClasses.js
@@ -144,17 +144,17 @@
buffer.push("fixedTitle=true");
if (this._disabled)
buffer.push("disabled=true");
},
serializeFilters(buffer)
{
for (let filter of this.filters)
- buffer.push(filter.text.replace(/\[/g, "\\["));
+ buffer.push(filter.text.replace(/^(\s*)\[/, "$1\\["));
},
toString()
{
let buffer = [];
this.serialize(buffer);
return buffer.join("\n");
}
« no previous file with comments | « no previous file | test/data/patterns.ini » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld