Skip to content

Url encoding of '$' not working #36

Open
@jolySoft

Description

@jolySoft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions