mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +00:00
LibWeb: Implement USVString scalar value handling
USVString is defined in the IDL spec as: > The USVString type corresponds to scalar value strings. Depending on > the context, these can be treated as sequences of either 16-bit > unsigned integer code units or scalar values. This means we need to account for surrogate code points by using the replacement character. This fixes the last test in https://wpt.live/url/url-constructor.any.html
This commit is contained in:
parent
2e884ff140
commit
aa32bfa448
Notes:
github-actions[bot]
2024-08-08 09:50:59 +00:00
Author: https://github.com/shannonbooth
Commit: aa32bfa448
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/998
Reviewed-by: https://github.com/skyrising
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 32 additions and 4 deletions
|
@ -163,6 +163,17 @@ pathname => '/foo/bar'
|
|||
search => '??a=b&c=d'
|
||||
searchParams => '%3Fa=b&c=d'
|
||||
hash => ''
|
||||
new URL('http://example.com/<2F><><EFBFBD><EFBFBD><F0909FBE><EFBFBD>﷏ﷰ?<3F><><EFBFBD><EFBFBD><F0909FBE><EFBFBD>﷏ﷰ', undefined)
|
||||
protocol => 'http:'
|
||||
username => ''
|
||||
password => ''
|
||||
host => 'example.com'
|
||||
hostname => 'example.com'
|
||||
port => ''
|
||||
pathname => '/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
|
||||
search => '?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
|
||||
searchParams => '%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF='
|
||||
hash => ''
|
||||
=========================================
|
||||
URL.parse('ftp://serenityos.org:21', undefined)
|
||||
protocol => 'ftp:'
|
||||
|
@ -329,3 +340,14 @@ pathname => '/foo/bar'
|
|||
search => '??a=b&c=d'
|
||||
searchParams => '%3Fa=b&c=d'
|
||||
hash => ''
|
||||
URL.parse('http://example.com/<2F><><EFBFBD><EFBFBD><F0909FBE><EFBFBD>﷏ﷰ?<3F><><EFBFBD><EFBFBD><F0909FBE><EFBFBD>﷏ﷰ', undefined)
|
||||
protocol => 'http:'
|
||||
username => ''
|
||||
password => ''
|
||||
host => 'example.com'
|
||||
hostname => 'example.com'
|
||||
port => ''
|
||||
pathname => '/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
|
||||
search => '?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
|
||||
searchParams => '%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF='
|
||||
hash => ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue