From 1e91fb8733ae6f591b13246d8ea9932fa781a99d Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 22 Sep 2020 11:18:12 -0400 Subject: [PATCH] Fine tune regex used to detect inline script contexts Related commit: - https://github.com/gorhill/uBlock/commit/b735ac6b6abab7d5f45e15bbba3b4ba6cbf43935 --- 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 8125f0369..52abeb6d9 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -221,7 +221,7 @@ } const reDocURL = new RegExp(docURL.replace(reRegexEscape, '\\$&'), 'g'); const stack = err.stack - .replace(/^.*?\b[gs]et\b[^\n\r]+?[\n\r]*/m, '') + .replace(/^.*?\b[gs]et\b[^\n\r]+?(?:[\n\r]+|$)/m, '') .replace(reDocURL, ''); const r = reNeedle.test(stack); if (