-
Notifications
You must be signed in to change notification settings - Fork 40
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
Cannot perform a request with url containing braces #102
Comments
My browser converts your link into this: https://gitlab.com/morley-framework/morley/-/issues/new?issue%5Btitle%5D=Indigo%20website:%20 That link is valid and is accepted by
|
@Martoon-00 Should we close or you still want some sort of change? |
Could you tell which browser do you use? Because when I try firefox and chrome, they don't seem to display any escaping. |
I use Google Chrome. |
I asked several people, and they don't have such conversion performed automatically, at least in the address bar (this includes tries with Firefox and Google Chrome; with Linux and Mac as OS). Though if I press "Copy Link Location" in firefox, it escapes. Despite this feature helps the user to avoid the issue, it does not seem reliable to me. |
It is not about the feature, which is just a courtesy performed by browsers sometimes. It is about the fact that square brackets should be escaped in URIs. |
Ah yes, I see, even browsers have it escaped inside and naturally operate only with valid URIs. Okay, then putting the responsibility to escape urls on users seems justified. |
With the recent updates, the only way to construct a
Url
value from a string known at runtime is viaURI
type.However, I have a case that got broken with this update. For instance, if I have the following link:
https://gitlab.com/morley-framework/morley/-/issues/new?issue[title]=Indigo%20website:%20
it fails to parse as URI because it contains
[
and]
in query parameters which are not allowed there. Nevertheless, this string is considered a valid URL by browsers and by the old version ofreq
, and using such format with braces for query parameter name seems to be quite wide-spread.This issue indeed seems weird because normally URLs form a subset of URIs, but apparently, in practice that does not hold.
Would like to hear your opinion on which is the best way to deal with this.
The text was updated successfully, but these errors were encountered: