-
Notifications
You must be signed in to change notification settings - Fork 22
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
Spec and WPT inconsistencies #239
Comments
Another issue @annevk : new URLPattern({ hostname: 'bad#hostname' }); should not throw but there is a WPT that validates that it throws.
This is wrongly implemented on Deno's URLPattern, Cloudflare's workerd and Chromium. |
Hmm, but |
If I understand it correctly: This doesn't fail, hence it shouldn't fail on URLPattern as well:
|
Host parser (specifically domain to ASCII with domain and false) strip all trailing values whenever it sees |
Another bug. The following WPT fails on Chromium and does not comply with the specification. Here's the Chromium implementation: https://source.chromium.org/chromium/chromium/src/+/main:components/url_pattern/url_pattern_util.cc;l=186;drc=c0265133106c7647e90f9aaa4377d28190b1a6a9
I think Deno's implementation might also be wrong, but I couldn't find the appropriate check that validates "\m" there... @lucacasonato would you mind taking a look? |
Another test case is invalid: ada-url/ada@d17f000 If you run the following on Google Chrome, you'll get the following error:
But, Particularly, the following should work and works according to URL spec:
Therefore, this test case shouldn't fail. |
What is the issue with the URL Pattern Standard?
There is a web-platform test that is even implemented by Chrome that is not covered with the URLPattern spec.
This fails on Chromium due to this function validation: https://chromium.googlesource.com/chromium/src/+/main/extensions/common/url_pattern.cc#101
But other than canonicalizePort there is no place that actually validates the validity of the port, and canonicalizePort calls url parser setter which removes leading and trailing spaces which makes
"80 "
input valid.Relevant WPT: https://github.com/web-platform-tests/wpt/blob/0c1d19546fd4873bb9f4147f0bbf868e7b4f91b7/urlpattern/resources/urlpatterntestdata.json#L1146
The text was updated successfully, but these errors were encountered: