-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin includes:
Apply the domain to ASCII algorithm to each component of the host part of the origin tuple, and append the results — each component, in the same order, separated by U+002E FULL STOP characters (.) — to result. [URL]
… but domain to ASCII in https://url.spec.whatwg.org/#concept-domain-to-ascii takes and returns a full domain, not a domain component. It already splits on U+002E FULL STOP and joins back internally.
I think the quoted text should at least be replaced with something like:
Apply the domain to ASCII algorithm to the host part of the origin tuple, and append the result to result. [URL]
Additionally, assuming the origin comes from https://url.spec.whatwg.org/#concept-url-origin, its host part is the host of an URL record that is the result of host parsing https://url.spec.whatwg.org/#concept-host-parser, and therefor has already gone through domain to ASCII.
Is it useful to call domain to ASCII again? Is it not idempotent?