-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Closed
Copy link
Labels
data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/APICompat data for Web APIs. https://developer.mozilla.org/docs/Web/APIp3Medium priority – Community PRs encouraged.Medium priority – Community PRs encouraged.
Description
What type of issue is this?
Missing compatibility data
What information was incorrect, unhelpful, or incomplete?
See mdn/content#23320. The URL spec went through two rounds of modifications related to trailing spaces in opaque paths that both ended up being implemented, and this should be documented because currently browsers are disagreeing.
What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
Data for whatwg/url#728 and whatwg/url#844
Did you test this? If so, how?
Try the following code:
const url = new URL("data:text/plain,Hello #frag");
console.log(JSON.stringify(url.pathname));
url.hash = "";
console.log(JSON.stringify(url.pathname));Several years ago, the result was
"text/plain,Hello "
"text/plain,Hello "
About 2 years ago, and Chrome and Firefox as of now, the result is
"text/plain,Hello "
"text/plain,Hello"
But, in Safari TP, the result has been changed to
"text/plain,Hello%20"
"text/plain,Hello%20"
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname
MDN metadata
MDN page report details
- Query:
api.URL.pathname - Report started: 2025-09-15T03:48:43.593Z
Metadata
Metadata
Assignees
Labels
data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/APICompat data for Web APIs. https://developer.mozilla.org/docs/Web/APIp3Medium priority – Community PRs encouraged.Medium priority – Community PRs encouraged.