-
Notifications
You must be signed in to change notification settings - Fork 42
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
equal char in query value is not encoded #21
Comments
Hi @yshrsmz. While it is true about SearchParams behavior, withQuery version is properly parsed by URL (spec is splitting by // k1=v1&k2=v2
console.log(new URL('https://example.com?p=k1=v1%26k2=v2').searchParams.get('p')) Do you have an example that current behavior is making problems? |
Hi @pi0
I'm not 100% sure but one of my clients seems to have very naive query parsing logic and So I thought it would great if ufo can support encoding |
I see. Implementing a change would be easy but since the goal of ufo is to stick with the standard and do less possible encoding in normalized/stringified URLs, I need better context of what clients (browser?) do not properly work. |
Sorry, I mean "customer" by "client". I need to create a URL for my partner company's web service(e.g. |
Can you possibly please ask him/her about what library/software is used and broken? That would help a lot deciding about this. In the meantime i will double check whatwg parser. Worst case we can add a flag for this :) |
I have a usecase which requires me to pass a query-string-like string as a query value.
The above sample prints the following results.
As you can see, ufo does not encode
=
char while URL does.Is there any reason to not escape equal char in a query value?
Would be great if ufo can encode equal char as well.
The text was updated successfully, but these errors were encountered: