Skip to content
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

%5B and %5D in URLs instead of [ and ] #949

Closed
drnkwtr opened this issue Jun 5, 2024 · 2 comments
Closed

%5B and %5D in URLs instead of [ and ] #949

drnkwtr opened this issue Jun 5, 2024 · 2 comments

Comments

@drnkwtr
Copy link

drnkwtr commented Jun 5, 2024

Hello, dear community and developers!

Today i met a problem on submitting form. Each filter[any] gone to filter%5Bany%5D. It looks pretty bad as i think, so iirc it can't be fixed in URL, so is there any way to replace ?filter[any] to ?any=123&any_other=1234?

Thanks a lot for your replies, so appreciate.

@ivan006
Copy link

ivan006 commented Aug 8, 2024

Is this a joke?

@AlexVanderbist
Copy link
Member

Hey @drnkwtr,

Unfortunately query string parameters are always URL-encoded to ensure that special characters do not interfere with the URL structure. Using the filter[field] (nested query string parameter) syntax is totally valid tho and even supported by many front-end and back-end frameworks and packages.

Specifically for this package; if you prefer a different way to define filters in the URL, you can update your configuration by setting query-builder.parameters.filter to null. This will allow you to use filters like ?foo=bar&baz=value for the query builder.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants