- From: Timothy Gu <notifications@github.com>
- Date: Fri, 24 Sep 2021 16:46:29 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 24 September 2021 23:46:42 UTC
Generally, we assume setters will keep the URL valid and roundtrippable. However, this turns out not to be true in a specific case: ```js u = new URL('data:text/html,hello #hash'); u.hash = ''; console.log(JSON.stringify(u.href)); // "data:text/html,hello " u2 = new URL(u); // constructor strips leading/trailing spaces as a first step console.log(JSON.stringify(u2.href)); // "data:text/html,hello" without the trailing space ``` This is only an issue because we allow spaces to appear verbatim in cannot-be-a-base URL paths. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/651
Received on Friday, 24 September 2021 23:46:42 UTC