LibWeb/HTML: Encoding parse a URL when setting a href URL

Fixes many WPT encoding regression tests which regressed in
fe891727dc.
This commit is contained in:
Shannon Booth 2024-12-11 21:01:22 +13:00 committed by Jelle Raaijmakers
commit f110edebd1
Notes: github-actions[bot] 2024-12-11 08:49:13 +00:00
3 changed files with 29 additions and 5 deletions

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="iso-2022-jp">
<script src="../include.js"></script>
<script>
test(() => {
const input = "\u4E05"; // 丅
const a = document.createElement("a");
a.href = "https://ladybird.org/?" + input;
println(a.search.substr(1));
})
</script>
</head>
<body></body>
</html>