Forum Discussion

endamcnamee's avatar
endamcnamee
Contributor
7 years ago

Search with keyword that contains an apostrophe

I am trying to retrieve posts using the V2 Rest Api (GET) and if users enter an apostrophe as the keyword search term the API does not retrieve results. I have tried encoding and escaping the apostrophe but with no success. Has anyone come across this before?

 

e.g. 

https://api.lithium.com/community/2.0/nepep88636/search?q=SELECT%20id%2C%20subject%2C%20search_snippet%2C%20view_href%2C%20post_time%20FROM%20messages%20WHERE%20subject%20MATCHES%20%27keyword%27%20OR%20body%20MATCHES%20%27keyword%27%20AND%20labels.text%20%3D%20%27FAQ%27%20AND%20board.id%20%3D%20%27Knowledge-Base%27%20LIMIT%2010%20OFFSET%200

 

(replace both instances of keyword)