fix: remove redundant regex escape in chat envelope

This commit is contained in:
Ayaan Zaidi 2026-02-21 08:21:50 +05:30
parent e5a56b30ff
commit 0baca5ccc1
1 changed files with 1 additions and 1 deletions

View File

@ -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("|") +