CatalogueOfLife / checklistbank

UI for checklistbank.org
https://www.checklistbank.org/
6 stars 2 forks source link

Name match tool confused by tabs #1294

Closed dhobern closed 9 months ago

dhobern commented 9 months ago

Cutting and pasting pairs of columns (scientificName and authorship) from Excel into the Name match tool gives unexpected results because of the tabs.

Try matching the following against the latest COL:

Dishkeya bifurcata  (Braun, 1915)
Dishkeya gothica    Stonis & Solis, 2020
Dishkeya gouaniae   (Stonis & Diškus, 2007)
Dishkeya ursipedella    Diškus, Mey & Stonis, 2022

The two rows with parentheses around the authorship are parsed correctly to the species. The other two are matched against the genus. Replacing the tabs with spaces gives the expected result.

Pasting from Excel is not an unlikely use case.

mdoering commented 9 months ago

These are the API resources being called from the UI:

https://api.checklistbank.org/nidx/match?q=Dishkeya%20bifurcata(Braun,%201915) https://api.checklistbank.org/nidx/match?q=Dishkeya%20gothicaStonis%20&%20Solis,%202020 https://api.checklistbank.org/nidx/match?q=Dishkeya%20gouaniae(Stonis%20&%20Di%C5%A1kus,%202007) https://api.checklistbank.org/nidx/match?q=Dishkeya%20ursipedellaDi%C5%A1kus,%20Mey%20&%20Stonis,%202022

Looks like the tabs are simply being removed.

mdoering commented 9 months ago

The ampersand does not seem to be URL encoded either which leads to wrong query parameters.

dhobern commented 9 months ago

image image