I tried to escape the single quote when preparing the query in JS this way:
_value.replace(/'/g,'%27')
and this way:
_value.replace(/\'/g,'\\\'');
both doesn't seem to work
You can see an example here: http://services.odata.org/V3/Northwind/Northwind.svc/Orders?$select=Freight,CustomerID&$filter=ShipName+eq+'B's%20Beverages'&$format=json
Does anyone know how to escape the single quote?
Thanks
The single quote need to be doubled, for instance:
ShipName+eq+'B''sBeverages'
instead of
ShipName+eq+'B'sBeverages'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With