AtlasOfLivingAustralia / biocache-service

Occurrence & mapping webservices
https://biocache-ws.ala.org.au/ws/
Other
9 stars 26 forks source link

Non-breaking spaces in Biocache search queries cause unexpected results or errors #860

Closed timhicks-ala closed 6 months ago

timhicks-ala commented 10 months ago

Non-breaking space characters can become included in species names and other data from outside sources, and this can cause unexpected behaviour when taken to the ALA. When included in Biocache searches, they cause instant HTTP 400 errors.

https://biocache.ala.org.au/occurrences/search?q=taxa%3A%22Sagittaria%C2%A0platyphylla%22 https://biocache.ala.org.au/occurrences/search?q=taxa%3A%22Sagittaria+platyphylla%22

Copy the following text for an example: Sagittaria platyphylla

adam-collins commented 10 months ago

Updated the pattern for taxa:

pull request https://github.com/AtlasOfLivingAustralia/biocache-service/pull/864

kylie-m commented 6 months ago

Tested, passed. Both links above are working for me on biocache-test, returning same number of record as does a search in the UI when copying and pasting the text example above (Sagittaria platyphylla)