mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 17:49:39 +02:00
Fix regex used to extract attribute name in element picker
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/mh2ctv/
This commit is contained in:
parent
97619cf8f5
commit
9a94ba0a22
@ -252,7 +252,7 @@ const cosmeticCandidatesFromFilterChoice = function(filterChoice) {
|
|||||||
}
|
}
|
||||||
// Remove attribute values.
|
// Remove attribute values.
|
||||||
if ( (specificity & 0b0010) === 0 ) {
|
if ( (specificity & 0b0010) === 0 ) {
|
||||||
const match = /^\[([^^=]+)\^?=.+\]$/.exec(filter);
|
const match = /^\[([^^*$=]+)[\^*$]?=.+\]$/.exec(filter);
|
||||||
if ( match !== null ) {
|
if ( match !== null ) {
|
||||||
filter = `[${match[1]}]`;
|
filter = `[${match[1]}]`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user