diff --git a/packages/angular/build/src/utils/server-rendering/manifest.ts b/packages/angular/build/src/utils/server-rendering/manifest.ts index a23faa69a7fd..b75af9435c34 100644 --- a/packages/angular/build/src/utils/server-rendering/manifest.ts +++ b/packages/angular/build/src/utils/server-rendering/manifest.ts @@ -26,6 +26,7 @@ const MAIN_SERVER_OUTPUT_FILENAME = 'main.server.mjs'; const UNSAFE_CHAR_MAP: Record = { '`': '\\`', '$': '\\$', + '\\': '\\\\', }; /** @@ -36,7 +37,7 @@ const UNSAFE_CHAR_MAP: Record = { * @returns The escaped string where unsafe characters are replaced. */ function escapeUnsafeChars(str: string): string { - return str.replace(/[$`]/g, (c) => UNSAFE_CHAR_MAP[c]); + return str.replace(/[$`\\]/g, (c) => UNSAFE_CHAR_MAP[c]); } /**