From 66233bd9cb65c5495121a52e89082391db2d97e3 Mon Sep 17 00:00:00 2001 From: Variet Worker Date: Wed, 15 Apr 2026 15:37:09 +0900 Subject: [PATCH] =?UTF-8?q?fix(bridge):=20strengthen=20JUNK=5FCONTENT=5FRE?= =?UTF-8?q?=20=E2=80=94=20add=20CSS=20block,=20.code-block/.code-line,=20i?= =?UTF-8?q?ntegration.build=20patterns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unit tested: 12 legit commands pass, all junk patterns now filtered. HTML manually patched to v14 (bypasses extension host cache). --- extension/src/http-bridge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/src/http-bridge.ts b/extension/src/http-bridge.ts index 066925e..723f868 100644 --- a/extension/src/http-bridge.ts +++ b/extension/src/http-bridge.ts @@ -306,7 +306,7 @@ function _handlePending(req: any, res: any, ctx: HttpBridgeContext) { } // v14: Server-side junk content filter — CSS, source code, icon glue // This is the last line of defense regardless of observer version - const JUNK_CONTENT_RE = /(!important|::selection|background-color:|var\(--|font-size:|border-[a-z]+:|padding:|margin:|display:\s|===|!==|\|\||\.test\(|\.match\(|\.replace\(|_RE[.\s]|\brawDesc\b|\brawCmd\b|\benrichedCmd\b|\bquerySelector\b)/; + const JUNK_CONTENT_RE = /(!important|::selection|background-color:|var\(--|font-size:|border-[a-z]+:|padding:|margin:|display:\s|===|!==|\|\||\.\btest\(|\.\bmatch\(|\.\breplace\(|_RE[.\s]|\brawDesc\b|\brawCmd\b|\benrichedCmd\b|\bquerySelector\b|\.code-block|\.code-line|\.line-content|\{\s*--|integration\.build)/; const ICON_GLUE_RE = /(alternate_email|content_copy|content_paste|check_circle|chevron_right|chevron_left|keyboard_arrow|arrow_drop_down|arrow_drop_up|more_horiz|more_vert|expand_more|expand_less)[a-zA-Z]/; if (JUNK_CONTENT_RE.test(cmd) || ICON_GLUE_RE.test(cmd)) { ctx.logToFile(`[HTTP] filtered junk content: "${cmd.substring(0, 80)}"`);