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

getFeature crashes when WFS filter contains percent sign #1848

Closed
steff-o opened this issue Oct 3, 2023 · 0 comments · Fixed by #1877
Closed

getFeature crashes when WFS filter contains percent sign #1848

steff-o opened this issue Oct 3, 2023 · 0 comments · Fixed by #1877

Comments

@steff-o
Copy link
Contributor

steff-o commented Oct 3, 2023

Describe the bug
getFeature can not handle percent wildcard in a filter

To Reproduce
Steps to reproduce the behavior:

  1. Configure a WFS layer with the filter property set to something that contains a percent sign e.g. "filter": "text LIKE '%tter%'"
  2. Make a getFeature request on that layer
  3. Watch error in console

Expected behavior
It should return those features that passes the filter

Additional context
Error occurs because when getFeature sends its request it is not URL encoded and instead relies on the automatic URL encoding that happens for all requests from a browser. Unfortunately that automatic URL encoding does not encode percent signs as that would lead to double encoding if the URL was already URL encoded.

This is one more example that getFeature should be rewritten as just a wrapper for WFSSource to avoid double implementation that in some cases behaves a bit different (And WFSSource is always the one that does it best).

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

Successfully merging a pull request may close this issue.

2 participants