mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-07 02:22:54 +00:00
* fix(events): sanitize queued system markers * fix(changelog): record system event sanitization
9 lines
436 B
TypeScript
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";
|