LinqToQuerystring icon indicating copy to clipboard operation
LinqToQuerystring copied to clipboard

Url encoding of '$' not working

Open jolySoft opened this issue 11 years ago • 2 comments

When using the LinqToQueryableAttibute in the webApi2 solution any url encoded characters are not decoded:

Within LinqToQueryable.cs (27) => when the query string is pulled it is not checked for any encoding.

Then LinqToQueryable.cs (35) => this is passed to extension method LinqToQuerystring in an encoded state

Then Extensions.cs(47) => the querystring is split based upon '$' but '$' is still %24 so odataQueries count is 0

*** FIX ***

I got the code locally => added a reference to System.Web and in the LinqToQueryable.cs at line 34 did this:

var queryString = HttpUtility.UrlDecode(actionExecutedContext.Request.RequestUri.Query);

Works for both now.

jolySoft avatar Jun 11 '14 12:06 jolySoft

Thanks for the report, and sorry for the delay in responding. I hope to look at this in the next week or two.

beyond-code-github avatar Jul 10 '14 21:07 beyond-code-github

+1 Experiencing this too

ccoulson avatar Mar 05 '15 16:03 ccoulson