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

sqlfilter / json url parameter encoding #988

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

dbauszus-glx
Copy link
Member

JSON does not want to be encoded as stringified URI. A JSON value may contain an ampersand (&) character. The JSON value should be stringified and URLComponent encoded.

The api module script should not be required to decode URI parameter. This should happen by default.

Hence the parameter value is already assumed to be encoded by the time the value is added to [filter] SQLParams array. The skip option for the wildcard is therefore unnecessary.

@dbauszus-glx dbauszus-glx added the Bug A genuine bug. There must be some form of error exception to work with. label Oct 31, 2023
Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbauszus-glx Thanks for this - been doing a little bit of testing.
This is working for filter.current which contains a % or &.
This is working for the legend filter which contains a % or &.

However, the filter module is not working correctly. It throws an error in the console
image

@simon-leech
Copy link
Contributor

@dbauszus-glx Just pushed a fix to this i think - but needs testing by others.

Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all working for me now !

Copy link

sonarcloud bot commented Nov 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@RobAndrewHurst RobAndrewHurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me!

@RobAndrewHurst RobAndrewHurst merged commit b48454b into GEOLYTIX:main Nov 2, 2023
6 checks passed
@dbauszus-glx dbauszus-glx deleted the sqlfilter-encoding branch January 29, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants