mdn / mdn/content

Document Windows file path handling in URL parsing (WHATWG URL #874)

Open
#40,686 0 comments 0 reactions 0 assignees View on GitHub
area: URL/URLPattern Content:WebAPI needs BCD update waiting for implementations
Dominant language
Markdown
Stars
11k
Forks
23.2k
Avg merge
2d 9h
Merged PRs (30d)
331

Description

## What information was incorrect, unhelpful, or incomplete?
The URL API documentation should be updated to reflect the
new Windows file path handling feature being added to the
WHATWG URL specification.

## What did you expect to see?
Documentation explaining that Windows drive letter patterns
(like `C:\folder\file.txt`) are automatically converted to
`file:///` URLs when parsed.

## Example
```javascript
new URL("C:\\folder\\file.txt")
// Returns: file:///C:/folder/file.txt
```
Implementation status

Implementation bugs have been filed:
- Chromium: https://issues.chromium.org/issues/437449112
- Gecko: https://webcompat.com/issues/170937
- WebKit: https://bugs.webkit.org/show_bug.cgi?id=297169
- Deno: https://github.com/denoland/deno/issues/30363
- Node.js: https://github.com/nodejs/node/issues/59415

Related links

- Spec PR: https://github.com/whatwg/url/pull/874
- Original issue: https://github.com/whatwg/url/issues/873
- Tests:
https://github.com/web-platform-tests/wpt/pull/53459

This documentation update should be made once the spec
change is merged and browsers begin implementation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.