-
Notifications
You must be signed in to change notification settings - Fork 30k
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
url: expose WHATWG url.origin as ASCII #13126
Conversation
const unicodeHost = unicode ? domainToUnicode(host) : host; | ||
return `${scheme}//${unicodeHost}${port === null ? '' : `:${port}`}`; | ||
// Refs: https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin | ||
function serializeTupleOrigin(scheme, host, port) { |
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.
Maybe keep https://html.spec.whatwg.org/multipage/browsers.html#unicode-serialisation-of-an-origin
or quote the Note: There used to also be a Unicode serialization of an origin. However, it was never widely adopted.
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.
Is there a need to? This function is purely internal, and there is no remnant from the previous Unicode serialization that needs explanation.
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.
Since the standard kept a "there was something here", I thought we could emulate.
But I yield to your decision.
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.
Lgtm. This part was always a bit sketchy to me since I knew browsers weren't consistent. Glad to see this fixed
Landed in 413691f. |
PR-URL: #13126 Refs: whatwg/url#297 Refs: web-platform-tests/wpt#5944 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #13126 Refs: whatwg/url#297 Refs: web-platform-tests/wpt#5944 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #13126 Refs: whatwg/url#297 Refs: web-platform-tests/wpt#5944 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Fixes: 413691f "url: expose WHATWG url.origin as ASCII" Refs: nodejs#13126
Refs: whatwg/url#297
Refs: web-platform-tests/wpt#5944
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
url