Skip to content

Ampersand (&) not encoded in parameter value #134

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

Closed
JensRoggenstein opened this issue Feb 25, 2025 · 3 comments
Closed

Ampersand (&) not encoded in parameter value #134

JensRoggenstein opened this issue Feb 25, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@JensRoggenstein
Copy link

Describe the bug
When I define a query parameter value which contains an ampersand, the query value is split to a second query parameter instead of encoding all characters.

Steps to reproduce

  • Create a request
  • Add a query parameter with key "filters" and value "item.id==123&item.type==bug"
  • The generated query string is ?filters=item.id%3D%3D123&item.type=%3Dbug

Expected behavior

  • The query parameter value should be completely URL encoded instead of creating a second query parameter
  • The generated query string should be ?filters=item.id%3D%3D123%26item.type%3D%3Dbug

It is currently not possible to send the request with JetClient as expected from the backend. Either the ampersand is not encoded, which splits the parameter value to a second query parameter, or it is double encoded if I encode it as %26 in the parameter value field.

Environment information:

  • plugin version: 2024.3.26-243
@JensRoggenstein JensRoggenstein added the bug Something isn't working label Feb 25, 2025
@AntonShuvaev
Copy link
Collaborator

Thanks for reporting the issue. As a workaround, you can disable Encode URL automatically in the folder settings and manually encode & as %26. I will add automatic encoding for parameter values in the next version.

@AntonShuvaev
Copy link
Collaborator

I've fixed the issue. Now, when you write $ or # in the query parameter table, it is encoded. To prevent double encoding, you need to disable "Encode URL automatically" in the folder settings.

@JensRoggenstein
Copy link
Author

Thanks, Anton, this workaround solves our issue. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants