From 0baca5ccc11c83727fe3db02b6ef6b11b421e698 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Sat, 21 Feb 2026 08:21:50 +0530 Subject: [PATCH] fix: remove redundant regex escape in chat envelope --- src/shared/chat-envelope.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/chat-envelope.ts b/src/shared/chat-envelope.ts index e7a8bcc2f4d..c96a231af8b 100644 --- a/src/shared/chat-envelope.ts +++ b/src/shared/chat-envelope.ts @@ -24,7 +24,7 @@ const INBOUND_METADATA_HEADERS = [ "Forwarded message context (untrusted metadata):", "Chat history since last reply (untrusted, for context):", ]; -const REGEX_ESCAPE_RE = /[.*+?^${}()|[\]\\\-]/g; +const REGEX_ESCAPE_RE = /[.*+?^${}()|[\]\\-]/g; const INBOUND_METADATA_PREFIX_RE = new RegExp( "^\\s*(?:" + INBOUND_METADATA_HEADERS.map((header) => header.replace(REGEX_ESCAPE_RE, "\\$&")).join("|") +