mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb: Handle unpaired surrogates in USVStrings
This should fix (at least) the last two remaining WPT test failures in FileAPI/unicode.html.
This commit is contained in:
parent
5559a3dc6e
commit
55f0dc823f
Notes:
github-actions[bot]
2024-10-13 21:25:25 +00:00
Author: https://github.com/justus2510
Commit: 55f0dc823f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1761
Reviewed-by: https://github.com/shannonbooth ✅
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 26 additions and 4 deletions
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async (done) => {
|
||||
const unpairedSurrogates = "hello\uDC00friends\uD800:)";
|
||||
const replacedSurrogates = "hello\uFFFDfriends\uFFFD:)";
|
||||
|
||||
const blob = new Blob([unpairedSurrogates]);
|
||||
println(await blob.text() === replacedSurrogates ? "PASS" : "FAIL")
|
||||
|
||||
const file = new File([unpairedSurrogates], "someFileName");
|
||||
println(await file.text() === replacedSurrogates ? "PASS" : "FAIL")
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue