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

Side by Side 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
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/data/patterns.ini » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 buffer.push("title=" + this._title); 142 buffer.push("title=" + this._title);
143 if (this._fixedTitle) 143 if (this._fixedTitle)
144 buffer.push("fixedTitle=true"); 144 buffer.push("fixedTitle=true");
145 if (this._disabled) 145 if (this._disabled)
146 buffer.push("disabled=true"); 146 buffer.push("disabled=true");
147 }, 147 },
148 148
149 serializeFilters(buffer) 149 serializeFilters(buffer)
150 { 150 {
151 for (let filter of this.filters) 151 for (let filter of this.filters)
152 buffer.push(filter.text.replace(/\[/g, "\\[")); 152 buffer.push(filter.text.replace(/^(\s*)\[/, "$1\\["));
153 }, 153 },
154 154
155 toString() 155 toString()
156 { 156 {
157 let buffer = []; 157 let buffer = [];
158 this.serialize(buffer); 158 this.serialize(buffer);
159 return buffer.join("\n"); 159 return buffer.join("\n");
160 } 160 }
161 }; 161 };
162 162
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 if (this.errors) 576 if (this.errors)
577 buffer.push("errors=" + this.errors); 577 buffer.push("errors=" + this.errors);
578 if (this.version) 578 if (this.version)
579 buffer.push("version=" + this.version); 579 buffer.push("version=" + this.version);
580 if (this.requiredVersion) 580 if (this.requiredVersion)
581 buffer.push("requiredVersion=" + this.requiredVersion); 581 buffer.push("requiredVersion=" + this.requiredVersion);
582 if (this.downloadCount) 582 if (this.downloadCount)
583 buffer.push("downloadCount=" + this.downloadCount); 583 buffer.push("downloadCount=" + this.downloadCount);
584 } 584 }
585 }); 585 });
OLDNEW
« 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