mirror of https://github.com/openclaw/openclaw.git
fix: remove redundant regex escape in chat envelope
This commit is contained in:
parent
e5a56b30ff
commit
0baca5ccc1
|
|
@ -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("|") +
|
||||
|
|
|
|||
Loading…
Reference in New Issue