diff --git a/web/app/components/app/in-site-message/index.tsx b/web/app/components/app/in-site-message/index.tsx index 728f58fb30..a3f42e7b1b 100644 --- a/web/app/components/app/in-site-message/index.tsx +++ b/web/app/components/app/in-site-message/index.tsx @@ -25,8 +25,10 @@ type InSiteMessageProps = { title: string } +const LINE_BREAK_REGEX = /\\n/g + function normalizeLineBreaks(text: string): string { - return text.replace(/\\n/g, '\n') + return text.replace(LINE_BREAK_REGEX, '\n') } function normalizeLinkData(data: unknown): { href: string, rel?: string, target?: string } | null {