Skip to content

Commit 10272db

Browse files
committed
Switch to non-transitional IDNA
1 parent edee129 commit 10272db

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

idna/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub mod uts46;
4949
pub fn domain_to_ascii(domain: &str) -> Result<String, uts46::Errors> {
5050
uts46::to_ascii(domain, uts46::Flags {
5151
use_std3_ascii_rules: false,
52-
transitional_processing: true, // XXX: switch when Firefox does
52+
transitional_processing: false,
5353
verify_dns_length: false,
5454
})
5555
}
@@ -67,7 +67,7 @@ pub fn domain_to_unicode(domain: &str) -> (String, Result<(), uts46::Errors>) {
6767
use_std3_ascii_rules: false,
6868

6969
// Unused:
70-
transitional_processing: true,
70+
transitional_processing: false,
7171
verify_dns_length: false,
7272
})
7373
}

tests/urltestdata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3683,6 +3683,21 @@
36833683
"search": "",
36843684
"hash": ""
36853685
},
3686+
{
3687+
"input": "https://faß.ExAmPlE/",
3688+
"base": "about:blank",
3689+
"href": "https://xn--fa-hia.example/",
3690+
"origin": "https://xn--fa-hia.example",
3691+
"protocol": "https:",
3692+
"username": "",
3693+
"password": "",
3694+
"host": "xn--fa-hia.example",
3695+
"hostname": "xn--fa-hia.example",
3696+
"port": "",
3697+
"pathname": "/",
3698+
"search": "",
3699+
"hash": ""
3700+
},
36863701
{
36873702
"input": "sc://faß.ExAmPlE/",
36883703
"base": "about:blank",

0 commit comments

Comments
 (0)