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

Unified Diff: lib/filterClasses.js

Issue 29582689: Noissue - Fix the escaping of '{' and '}' in CSS selectors (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Also update the content script Created Oct. 18, 2017, 7:39 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
« no previous file with comments | « lib/content/elemHideEmulation.js ('k') | test/browser/elemHideEmulation.js » ('j') | 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
@@ -904,17 +904,17 @@
if (domains)
{
this.selectorDomain = domains.replace(/,~[^,]+/g, "")
.replace(/^~[^,]+,?/, "").toLowerCase();
}
// Braces are being escaped to prevent CSS rule injection.
- this.selector = selector.replace("{", "\\x7B ").replace("}", "\\x7D ");
+ this.selector = selector.replace("{", "\\7B ").replace("}", "\\7D ");
}
exports.ElemHideBase = ElemHideBase;
ElemHideBase.prototype = extend(ActiveFilter, {
/**
* @see ActiveFilter.domainSeparator
*/
domainSeparator: ",",
« no previous file with comments | « lib/content/elemHideEmulation.js ('k') | test/browser/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld