fix: allow percent sign in getFeature filter #1877
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1848 by moving the wfs part of getFeture() to WfsSource class as it already urlecodes arguments correctly.
Also fixes #1523 when strategy = 'all' as that wasn't fixed in #1579
Probably also solves at least part of #1534, but on the other hand, it makes #1535 and #1536 almost impossible to merge.
As a bonus some redundant code from getFeature is removed and hopefully it will be easier to implement filters for QGIS and other servers and support for different WFS versions etc by keeping all code in one place.
I have tried to make it as backwards compatible as possible, but there is a small risk that if someone utilized or tried to compensate for the weaknesses (e.g. no coordinate transform) in a plugin or external code that may break. To my knowledge getFeature is used in search (internally in Origo) and from the MultiSelect plugin, which should be unaffected. The things that are deliberately not entirely backwards compatible are:
None of those should pose any problem unless the layer is configured only to be used by getFeature and you have a special 1.0.0 server for that that or it does not support post requests but you have configured the layer as 'POST' anyway.