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

Unified Diff: chrome/content/elemHideEmulation.js

Issue 29367031: Issue 4684 - Allow { and } in attribute and property selectors (Closed) Base URL: https://bitbucket.org/fhd/adblockpluscore
Patch Set: Add a space after the escape sequence for { and } Created Dec. 13, 2016, 4:01 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/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/elemHideEmulation.js
===================================================================
--- a/chrome/content/elemHideEmulation.js
+++ b/chrome/content/elemHideEmulation.js
@@ -132,17 +132,18 @@
var match = propertySelectorRegExp.exec(pattern.selector);
if (!match)
continue;
var propertyExpression = match[2];
var regexpString;
if (propertyExpression.length >= 2 && propertyExpression[0] == "/" &&
propertyExpression[propertyExpression.length - 1] == "/")
- regexpString = propertyExpression.slice(1, -1);
+ regexpString = propertyExpression.slice(1, -1)
+ .replace("\\x7B ", "{").replace("\\x7D ", "}");
else
regexpString = filterToRegExp(propertyExpression);
this.patterns.push({
text: pattern.text,
regexp: new RegExp(regexpString, "i"),
prefix: pattern.selector.substr(0, match.index),
suffix: pattern.selector.substr(match.index + match[0].length)
« no previous file with comments | « no previous file | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld