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

Unified Diff: lib/filterClasses.js

Issue 30002601: Issue 7284 - Move CSS escaping to createStyleSheet (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Reworked the escaping of selectors Created Feb. 12, 2019, 11:50 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
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -1355,18 +1355,17 @@
ElemHideBase.prototype = extend(ContentFilter, {
/**
* CSS selector for the HTML elements that should be hidden
* @type {string}
*/
get selector()
{
- // Braces are being escaped to prevent CSS rule injection.
- return this.body.replace("{", "\\7B ").replace("}", "\\7D ");
+ return this.body;
}
});
/**
* Class for element hiding filters
* @param {string} text see {@link Filter Filter()}
* @param {string} [domains] see {@link ElemHideBase ElemHideBase()}
* @param {string} selector see {@link ElemHideBase ElemHideBase()}

Powered by Google App Engine
This is Rietveld