Skip to content

Commit

Permalink
Match type exactly in prevent-addEventListener scriptlet
Browse files Browse the repository at this point in the history
Unless `type` is a regex of course.

Related feedback:
uBlockOrigin/uAssets#17907 (reply in thread)
  • Loading branch information
gorhill committed Oct 24, 2023
1 parent b8542cb commit d32204f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/resources/scriptlets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ function addEventListenerDefuser(
) {
const safe = safeSelf();
const extraArgs = safe.getExtraArgs(Array.from(arguments), 2);
const reType = safe.patternToRegex(type);
const reType = safe.patternToRegex(type, undefined, true);
const rePattern = safe.patternToRegex(pattern);
const log = shouldLog(extraArgs);
const debug = shouldDebug(extraArgs);
Expand Down

0 comments on commit d32204f

Please sign in to comment.