From d32204f9842091261afd5bf3eea90573f2058ece Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 23 Oct 2023 21:15:00 -0400 Subject: [PATCH] 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 --- assets/resources/scriptlets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 407dce41c..382fd6a29 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -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);