fetch rejects percent-encoded Base64 data URLs
dleviminzi opened ·
Final one. `fetch()` rejects Base64 `data:` URLs containing percent escapes. For example, `%3D` should become `=` before Base64 decoding, but celld passes it straight to `atob()`.
Here is a minimal repro:
```js await (await fetch("data:text/plain;base64,YQ%3D%3D")).text(); // Should return "a", but throws InvalidCharacterError ```
Here is a patch
[0001-Percent-decode-Base64-data-URL-payloads.patch](https://github.com/user-attachments/files/32133835/0001-Percent-decode-Base64-data-URL-payloads.patch)
bartlomiejureferenced 9c2d299dd6ablast month on GitHub
ryreferenced e519694581dclast month on GitHub
ryreferenced 4250d366aceblast month on GitHub
ryreferenced 3127cf8e307elast month on GitHub
ryreferenced 12d5b6333fe5last month on GitHub