Re: [whatwg/url] A '@' character in the host part of file URLs (Issue #805)

Thanks for the explanation. Let me confirm the intended visible behaviors of a proposal here.

The question is A and (B or C), right?
Regarding B or C, B seems more intuitive, aligning with the general understanding of "opaque."

A.  Don't percent-decode any characters in an opaque host.

``` javascript
const url = new URL("file://opaque%2ahost/");
console.log(url.hostname); // "opaque%2ahost"
console.log(url.href); // "file://opaque%2ahost/"
```

B.  Don't percent-encode any characters in an opaque host.

``` javascript
const url = new URL("file://opaque host/");
console.log(url.hostname); // "opaque host"
console.log(url.href); // "file://opaque host/"
```

C.  Percent-encode spaces (or other chars?) in an opaque host.

``` javascript
const url = new URL("file://opaque host/");
console.log(url.hostname); // "opaque%20host"
console.log(url.href); // "file://opaque%20host/"
```
> That way opaque hosts can still ban spaces,

I'm afraid  I might misunderstand what `ban`  means here. Is my understanding, C, correct?





-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/805#issuecomment-2513382865
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/805/2513382865@github.com>

Received on Tuesday, 3 December 2024 02:07:57 UTC