-
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
Does not tolerate +
in protocol
#228
Comments
The polyfill is managed in https://github.com/kenchris/urlpattern-polyfill and should be claimed there, but this is valid. To canonicalize a protocol, it uses the result of running basic URL parser. And in scheme state Actually chromium throws an error with the protocol string containing |
I haven't looked into this, but @sisidovski if you think this is just a bug in the Chromium implementation, could you file & link a Chromium bug? |
for reference, this is also happening in Deno, so potentially more of a spec issue |
@jeremyroman Filed https://crbug.com/357760925. I'm happy to work on it in spare time. |
@sisidovski I'm not sure if you're saying there is no bug in the spec here. I have a very hard time reading state-machine-oriented specs. What are the expected "token list" and "part list" and "protocol component" from Constructor string parsing given input "web+foo://example.com/baz"? |
@rotu Thanks. I took a look again a bit more in detail, and probably I caught your point. The step 3.11 Run consume a required token given parser and "end" in parse-a-pattern-string will throw TypeError if |
@sisidovski I don't think I even understood my point when I wrote that.
|
I don't think we will ever be able to make all URLs valid URL patterns (or, if they're valid, have the same meaning), though we can make needing escaping a little less common. I agree that describing how to effectively escape (either by hand or programmatically) would be a useful addition (I've written such algorithms myself, and they are indeed not trivial). I think it's probably possible to allow other-modifier tokens ( |
What is the issue with the URL Pattern Standard?
URLPattern doesn't tolerate
+
in protocol. The polyfill gives this error:This is especially a problem since the
web+
prefix is mandatory when registering schemes.The text was updated successfully, but these errors were encountered: