Describe the bug
Cookie values can contain = symbols. Browsers allow them, happy-dom only saves the part before the first =.
To Reproduce
Steps to reproduce the behavior:
rijenkii@rijenkiipc /t/hd
> npm install happy-dom
added 4 packages in 1s
1 package is looking for funding
run `npm fund` for details
rijenkii@rijenkiipc /t/hd
> node
Welcome to Node.js v20.18.0.
Type ".help" for more information.
> const document = new (require("happy-dom")).Window().document;
undefined
> document.cookie = "hello=beautiful=world"
'hello=beautiful=world'
> document.cookie
'hello=beautiful'
Expected behavior
Expected the whole cookie to be saved.
Additional context
|
const [key, value] = parts.shift().split('='); |
Describe the bug
Cookie values can contain
=symbols. Browsers allow them, happy-dom only saves the part before the first=.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected the whole cookie to be saved.
Additional context
happy-dom/packages/happy-dom/src/cookie/urilities/CookieStringUtility.ts
Line 18 in afd256b