-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization of file URLs is wrong #52
Comments
The patch that gives the expected results is if (url.scheme === "file" && url.host === null) {
output += "//";
} after the current step 2 of https://url.spec.whatwg.org/#concept-url-serializer |
Note: browser are inconsistent on the parsing of file URLs. Some parse However, the spec does not (it puts And, all implementations agree that file URLs with no host should be serialized with three slashes. |
Thanks, I totally neglected file URLs when adding support for everything-can-be-a-relative-URL-scheme. Hopefully soon there is some time to fix the remaining file URL issues. |
In particular, this should fix: * annevk/url#1 * #52 * https://www.w3.org/Bugs/Public/show_bug.cgi?id=23550 * https://www.w3.org/Bugs/Public/show_bug.cgi?id=26341 It does not introduce a global mode-switch for Windows vs Unix parsing behavior. I remain hopeful we can cross that gap.
This should be fixed now. |
https://url.spec.whatwg.org/#concept-url-serializer serializes file URLs as
file:<path>
, e.g.file:/foo/bar
. They should be serialized asfile:///foo/bar
.Related: jsdom/whatwg-url#22 web-platform-tests/wpt#2038
The text was updated successfully, but these errors were encountered: