Match `type` exactly in `prevent-addEventListener` scriptlet

Unless `type` is a regex of course.

Related feedback:
https://github.com/uBlockOrigin/uAssets/discussions/17907#discussioncomment-7362212
This commit is contained in:
Raymond Hill 2023-10-23 21:15:00 -04:00
parent b8542cb894
commit d32204f984
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -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);