algolia / instantsearch-ios

⚡️ A library of widgets and helpers to build instant-search applications on iOS.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/ios/
Apache License 2.0
591 stars 55 forks source link

fix(filters): issue with textual value escaping #293

Closed VladislavFitz closed 1 year ago

VladislavFitz commented 1 year ago

Summary

InstantSearch iOS constructs a bad request when receives facet value with quotation marks.

Example

The input 45\"-50\" tv\'s is transformed to "45"-50" tv's" and breaks the JSON format. This PR adds additional escaping for quotation marks in the textual filter values to avoid this issue.

Result

InstantSearch works correctly with facet values including quotation marks.