mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +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.
|
||||
if ( (specificity & 0b0010) === 0 ) {
|
||||
const match = /^\[([^^=]+)\^?=.+\]$/.exec(filter);
|
||||
const match = /^\[([^^*$=]+)[\^*$]?=.+\]$/.exec(filter);
|
||||
if ( match !== null ) {
|
||||
filter = `[${match[1]}]`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user