Skip to content

Commit d2c3936

Browse files
authored
URL: encode ^ in non-opaque paths
For whatwg/url#846.
1 parent 4fb0ab4 commit d2c3936

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

url/resources/setters_tests.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,8 +1921,8 @@
19211921
"href": "a:/",
19221922
"new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
19231923
"expected": {
1924-
"href": "a:/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9",
1925-
"pathname": "/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
1924+
"href": "a:/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]%5E_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9",
1925+
"pathname": "/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]%5E_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
19261926
}
19271927
},
19281928
{

url/resources/urltestdata.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8507,6 +8507,21 @@
85078507
"search": "",
85088508
"username": ""
85098509
},
8510+
{
8511+
"input": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
8512+
"base": null,
8513+
"hash": "",
8514+
"host": "",
8515+
"hostname": "",
8516+
"href": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
8517+
"origin": "null",
8518+
"password": "",
8519+
"pathname": "cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
8520+
"port": "",
8521+
"protocol": "non-special:",
8522+
"search": "",
8523+
"username": ""
8524+
},
85108525
{
85118526
"input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",
85128527
"base": null,
@@ -8634,10 +8649,10 @@
86348649
"hash": "",
86358650
"host": "host",
86368651
"hostname": "host",
8637-
"href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
8652+
"href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
86388653
"origin": "null",
86398654
"password": "",
8640-
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
8655+
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
86418656
"port":"",
86428657
"protocol": "foo:",
86438658
"search": "",
@@ -8649,10 +8664,10 @@
86498664
"hash": "",
86508665
"host": "host",
86518666
"hostname": "host",
8652-
"href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
8667+
"href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
86538668
"origin": "wss://host",
86548669
"password": "",
8655-
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
8670+
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
86568671
"port":"",
86578672
"protocol": "wss:",
86588673
"search": "",

0 commit comments

Comments
 (0)