Autocomplete and special characters

I have a autocomplete control that even though I see the network call sending this text 'B&J' when it reaches the api it shows up as just 'B' in the filter parameter and the rest is missing. How can I fix this? I'm unable to search name with special character in them.

Network call:
http://localhost:62595/api/Vendors/?$top=20&$filter=substringof(%27b&j%27,tolower(VendorID))

Autocomplete control:
<ejs-autocomplete id="vendors" autofill="true" filterType="Contains" minLength="3" suggestionCount="20" value="@Model.FileData.VendorId"
                                          blur="OnVendorChange" popupWidth="350px" ignoreCase="true"
                                          noRecordsTemplate="@Html.Raw("<span class='norecord'> This Vendor is Invalid</span>")">
         <e-autocomplete-fields value="VendorID" text="VendorName"></e-autocomplete-fields> 
         <e-data-manager url="/api/Vendors" adaptor="WebApiAdaptor" crossDomain="true"></e-data-manager>
</ejs-autocomplete>


API Controller:
[HttpGet]
public Object GetAllVendors([FromQuery(Name = "$filter")] string filter, [FromQuery] string vendorID)
{…..
          the filter param comes in with a value of  "substringof('b".

1 Reply

MS Madhu Sudhanan P Syncfusion Team October 18, 2018 06:38 AM UTC

 
Thanks for contacting Syncfusion support. 
 
We considered this requirement “Filter value is not encoded properly in WebApiAdaptor” as bug and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
 
 
Regards, 
Madhu Sudhanan. P 


Loader.
Up arrow icon