Closed wanderview closed 2 years ago
Currently the polyfill uses this code to restrict hostname characters:
https://github.com/kenchris/urlpattern-polyfill/blob/ad25d48b0857863ae0342bcdbc4578a4052a4e5b/src/url-utils.ts#L236
This is mostly correct, but its missing a few forbidden code points from the URL spec:
https://url.spec.whatwg.org/#forbidden-host-code-point
In particular, the space character is incorrectly allowed by the chromium URL parser and should be blocked in URLPattern. We are doing the same restriction in the c++ implementation in crbug.com/1248061 and are also adding WPT tests for this.
Currently the polyfill uses this code to restrict hostname characters:
https://github.com/kenchris/urlpattern-polyfill/blob/ad25d48b0857863ae0342bcdbc4578a4052a4e5b/src/url-utils.ts#L236
This is mostly correct, but its missing a few forbidden code points from the URL spec:
https://url.spec.whatwg.org/#forbidden-host-code-point
In particular, the
space character is incorrectly allowed by the chromium URL parser and should be blocked in URLPattern. We are doing the same restriction in the c++ implementation in crbug.com/1248061 and are also adding WPT tests for this.