Completed
Last Updated: 23 May 2025 08:31 by ADMIN
Release 9.0.0
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