Files
openclaw/src/auto-reply/reply/inbound-text.ts
Agustin Rivera c1151ea899 fix(events): sanitize queued system markers (#87094)
* fix(events): sanitize queued system markers

* fix(changelog): record system event sanitization
2026-05-26 20:07:39 -07:00

9 lines
436 B
TypeScript

export function normalizeInboundTextNewlines(input: string): string {
// Normalize actual newline characters (CR+LF and CR to LF).
// Do NOT replace literal backslash-n sequences (\\n) as they may be part of
// Windows paths like C:\Work\nxxx\README.md or user-intended escape sequences.
return input.replaceAll("\r\n", "\n").replaceAll("\r", "\n");
}
export { sanitizeInboundSystemTags } from "../../security/system-tags.js";