mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-12 03:01:04 +00:00
18 lines
540 B
HTML
18 lines
540 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
function escapeUnicode(str) {
|
|
return str.replace(/[\s\S]/g, function(c) {
|
|
return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);
|
|
});
|
|
}
|
|
|
|
test(() => {
|
|
let params = new URLSearchParams("\uFFFD=x&\uFFFC&\uFFFD=a");
|
|
params.sort();
|
|
println(params.toString())
|
|
for (const [key, value] of params) {
|
|
println(`'${escapeUnicode(key)}' => '${escapeUnicode(value)}'`);
|
|
}
|
|
})
|
|
</script>
|