Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9a94ba0

Browse files
committed
Fix regex used to extract attribute name in element picker
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/mh2ctv/
1 parent 97619cf commit 9a94ba0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/epicker-ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const cosmeticCandidatesFromFilterChoice = function(filterChoice) {
252252
}
253253
// Remove attribute values.
254254
if ( (specificity & 0b0010) === 0 ) {
255-
const match = /^\[([^^=]+)\^?=.+\]$/.exec(filter);
255+
const match = /^\[([^^*$=]+)[\^*$]?=.+\]$/.exec(filter);
256256
if ( match !== null ) {
257257
filter = `[${match[1]}]`;
258258
}

0 commit comments

Comments
 (0)