-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make dummyURL from the basic URL parser with a special scheme #269
Conversation
@annevk Not sure if this kind of simple change address the issue. Could you give some advice? Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo a couple of nits I think this is the right approach, yeah. This is also pretty much how WebKit handles this.
…orrect basic URL parser invocation
Updated based on your suggestions, thank you! |
spec.bs
Outdated
</div> | ||
|
||
<div algorithm> | ||
To <dfn>canonicalize a username</dfn> given a string |value|: | ||
|
||
1. If |value| is the empty string, return |value|. | ||
1. Let |dummyURL| be a new [=URL record=]. | ||
1. Let |dummyURL| be the result of [=create a dummy URL=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want "creating" not "create" here (and below) to get a proper sentence (you don't have to change the <dfn>
for that, as I mentioned Bikeshed takes care of making that work).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, fixed.
@sisidovski when merging this, please take care to follow https://github.com/whatwg/meta/blob/main/COMMITTING.md (in particular the Squash and merge section). I noticed this went wrong a few times for this repository. Feel free to reach out on https://whatwg.org/chat if you have questions or ask @domenic internally. |
Based on the discussion in #252.
We should not use URL records directly to canonicalize components, we should specify a special scheme as a default scheme. When we create a dummy URL, it should be created from the basic URL parser. This is not ideal but this can be achieved by creating a dummy URL with this fixed URL string.
Preview | Diff