From 34ef6e29d6038a5e346e6e631576586503db8cb5 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 9 Nov 2022 17:09:49 -0800 Subject: [PATCH] Fix replaceAll usage in post-process --- packages/next/server/post-process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/server/post-process.ts b/packages/next/server/post-process.ts index c64d406a08c07c5..ca1ec000fa2dad2 100644 --- a/packages/next/server/post-process.ts +++ b/packages/next/server/post-process.ts @@ -231,7 +231,7 @@ async function postProcessHTML( : null, inAmpMode || hybridAmp ? (html: string) => { - return html.replaceAll('&amp=1', '&=1') + return html.replace(/&amp=1/g, '&=1') } : null, ].filter(nonNullable)