Fix issue with spaces after comma and or filters

Combined filters separated with comma and a space resulted in an error. 
Example: 
Title==D, (Title|LikeCount)==3
Caused the error: "(Title not found"

Extended regex to allow whitespaces after the comma as documented.
This commit is contained in:
Alexander Weggerle
2020-07-04 21:16:54 +02:00
parent d86e35f77c
commit 6684524fcd
2 changed files with 18 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ namespace Sieve.Models
where TFilterTerm : IFilterTerm, new()
where TSortTerm : ISortTerm, new()
{
private const string EscapedCommaPattern = @"(?<!($|[^\\])(\\\\)*?\\),";
private const string EscapedCommaPattern = @"(?<!($|[^\\])(\\\\)*?\\),\s*";
[DataMember]
public string Filters { get; set; }