fix: encoding find my booking cookie since next decodes when parsing

this is done in order to handle emails containing plus signs
This commit is contained in:
Christian Andolf
2025-03-12 15:54:21 +01:00
committed by Michael Zetterberg
parent 550474dffe
commit 1a8a57599c
2 changed files with 6 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ export default function FindMyBooking() {
onSuccess: (result) => {
const values = form.getValues()
const value = new URLSearchParams(values).toString()
document.cookie = `bv=${value}; Path=/; Max-Age=30; Secure; SameSite=Strict`
document.cookie = `bv=${encodeURIComponent(value)}; Path=/; Max-Age=30; Secure; SameSite=Strict`
router.push(
`/${lang}/hotelreservation/my-stay/${encodeURIComponent(result.refId)}`
)