mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 17:02:27 +02:00
Mind escape sequences when validating :style
filters
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/668
This commit is contained in:
parent
81e8d8d867
commit
3b0d214633
@ -651,7 +651,6 @@
|
|||||||
api.compileSelector = (function() {
|
api.compileSelector = (function() {
|
||||||
const reAfterBeforeSelector = /^(.+?)(::?after|::?before|::[a-z-]+)$/;
|
const reAfterBeforeSelector = /^(.+?)(::?after|::?before|::[a-z-]+)$/;
|
||||||
const reStyleSelector = /^(.+?):style\((.+?)\)$/;
|
const reStyleSelector = /^(.+?):style\((.+?)\)$/;
|
||||||
const reStyleBad = /url\(/;
|
|
||||||
const reExtendedSyntax = /\[-(?:abp|ext)-[a-z-]+=(['"])(?:.+?)(?:\1)\]/;
|
const reExtendedSyntax = /\[-(?:abp|ext)-[a-z-]+=(['"])(?:.+?)(?:\1)\]/;
|
||||||
const reExtendedSyntaxParser = /\[-(?:abp|ext)-([a-z-]+)=(['"])(.+?)\2\]/;
|
const reExtendedSyntaxParser = /\[-(?:abp|ext)-([a-z-]+)=(['"])(.+?)\2\]/;
|
||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
@ -671,6 +670,8 @@
|
|||||||
div.style.cssText = '';
|
div.style.cssText = '';
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/668
|
||||||
|
const reStyleBad = /url\(|\\/i;
|
||||||
|
|
||||||
const entryPoint = function(raw) {
|
const entryPoint = function(raw) {
|
||||||
entryPoint.pseudoclass = false;
|
entryPoint.pseudoclass = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user