Unverified Commit e0b946a4 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix replaceAll usage in post-process (#42714)

Similar to https://github.com/vercel/next.js/pull/42550

Fixes:
https://dev.azure.com/nextjs/next.js/_build/results?buildId=43629&view=logs&jobId=14d0eb3f-bc66-5450-3353-28256327ad6c
x-ref: https://github.com/vercel/next.js/pull/42495

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent d124189a
...@@ -231,7 +231,7 @@ async function postProcessHTML( ...@@ -231,7 +231,7 @@ async function postProcessHTML(
: null, : null,
inAmpMode || hybridAmp inAmpMode || hybridAmp
? (html: string) => { ? (html: string) => {
return html.replaceAll('&amp=1', '&amp=1') return html.replace(/&amp=1/g, '&amp=1')
} }
: null, : null,
].filter(nonNullable) ].filter(nonNullable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment