- From: Hayato Ito <notifications@github.com>
- Date: Mon, 02 Dec 2024 18:07:53 -0800
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 3 December 2024 02:07:57 UTC
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