In Development
Last Updated: 07 Feb 2025 11:00 by ADMIN
Scheduled for 2025 Q2 (May)
Greg
Created on: 31 Jan 2025 14:16
Category: UI for Blazor
Type: Bug Report
0
DataSourceExtensions.ToODataString does not correctly encode filters that use # sign

It appears there are some issues with encoding special characters in the DataSourceExtensions.ToODataString extension method.

See snippet below. 

var ds = new DataSourceRequest()
{
	Filters = [new FilterDescriptor("FieldName", FilterOperator.IsEqualTo, "Route #")],
	Sorts = []
};
{
Console.WriteLine(ds.ToODataString());

$count=true&$filter=(FieldName%20eq%20%27Route%20#%27)&$skip=0

This results in a malformed url as the last part of of the query is interpreted as a fragment due to this character not being encoded.

0 comments