ladybird/Tests/LibWeb/Text/input/URL/search-params-with-invalid-utf8.html
Shannon Booth 9c72fc9642 LibWeb: Actually run UTF-8 decode without BOM
This fixes a crash using URLSearchParams when provided a percent encoded
string which does not percent decode to valid UTF-8.

Fixes a crash running https://wpt.live/url/urlencoded-parser.any.html
2024-08-10 10:39:43 +02:00

10 lines
311 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
const params = new URLSearchParams('%FE%FF');
for (const [key, value] of params) {
println(`key equals = ${"\uFFFD\uFFFD" === key}`);
println(`value equals = ${"" === value}`);
}
});
</script>