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

Unified Diff: lib/content/elemHideEmulation.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
« no previous file with comments | « no previous file | lib/elemHide.js » ('j') | lib/elemHide.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/content/elemHideEmulation.js
===================================================================
--- a/lib/content/elemHideEmulation.js
+++ b/lib/content/elemHideEmulation.js
@@ -343,17 +343,16 @@
}
class ContainsSelector
{
constructor(textContent)
{
this.dependsOnDOM = true;
this.dependsOnCharacterData = true;
-
Manish Jethani 2019/02/13 12:27:25 Unrelated?
hub 2019/02/13 16:33:31 This shouldn't have been here, indeed. Done.
this._regexp = makeRegExpParameter(textContent);
}
*getSelectors(prefix, subtree, styles, targets)
{
for (let element of this.getElements(prefix, subtree, styles, targets))
yield [makeSelector(element), subtree];
}
@@ -406,18 +405,17 @@
{
this.dependsOnStyles = true;
this.dependsOnDOM = true;
let regexpString;
if (propertyExpression.length >= 2 && propertyExpression[0] == "/" &&
propertyExpression[propertyExpression.length - 1] == "/")
{
- regexpString = propertyExpression.slice(1, -1)
- .replace("\\7B ", "{").replace("\\7D ", "}");
+ regexpString = propertyExpression.slice(1, -1);
}
else
regexpString = filterToRegExp(propertyExpression);
this._regexp = new RegExp(regexpString, "i");
}
*findPropsSelectors(styles, prefix, regexp)
« no previous file with comments | « no previous file | lib/elemHide.js » ('j') | lib/elemHide.js » ('J')

Powered by Google App Engine
This is Rietveld