Closed mardiros closed 8 months ago
Hi, coming from pydantic That redirect me to servo that redirect me here now.
The url validation specifis invalid host here I https://url.spec.whatwg.org/#host-invalid-code-point
But actually the host validation is partially implemented. A hostname can neither starts nor ends with an hyphen. But currently, this implementation says that -x is a valid hostname.
-x
https://jsdom.github.io/whatwg-url/#url=aHR0cHM6Ly8teC8=&base=YWJvdXQ6Ymxhbms=
This is a parser, not a validator. There are many invalid parseable URLs. This is discussed in the section of the spec you linked to.
Hi, coming from pydantic That redirect me to servo that redirect me here now.
The url validation specifis invalid host here I https://url.spec.whatwg.org/#host-invalid-code-point
But actually the host validation is partially implemented. A hostname can neither starts nor ends with an hyphen. But currently, this implementation says that
-x
is a valid hostname.https://jsdom.github.io/whatwg-url/#url=aHR0cHM6Ly8teC8=&base=YWJvdXQ6Ymxhbms=