I managed a solution to this using startswith().
Using $http.get() with oData and a $filter with text that may include the
escape character, single quote "'".
What I did is instead of using $filter=Title eq 'text'
I am using the oData startswith function.
$filter=startswith(Title, key)
and then I pass in as much of key as I can.
`iQuotePos = key.indexOf("'");
if(iQuotePos > -1) {
key = key.substring(0, iQuotePos);
}`
This works fine with our data set.
On Friday, June 13, 2014 12:48:22 PM UTC-4, Jonathan Matthew Beck wrote:
>
> If I have a quote in the title of a field I am passing to an oData query,
> like:
>
> Bob's Farm
>
> Then I do a string replace like this:
>
> Bob%27%27s Farm
>
> And when I use this value directly in the browser for oData query it works.
>
> But when I pass that value into Angular's http.get, for some reason it
> converts it to this:
>
> Bob%27s%20Farm
>
> and then returns an error from oData.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.