Skip to content

Filter by some special characters doesn't work #91

@maryuraeva

Description

@maryuraeva

Filters don't work when searched value contains:

  1. {some_text}<
  2. {some_text}>
  3. {some_text},{some_text}
  4. {some_text}|
  5. {some_text}.
  6. <>
  7. ,
  8. =
  9. and in other cases with special characters

In some case it throws error "The binary operator GreaterThan/Less than is not defined" or "{some_text} not found" and in other cases just returns all data.

I investigate this and found out that the issue with <>= characters is in regexp for filterSplits here:
https://github.com/Biarity/Sieve/blob/master/Sieve/Models/FilterTerm.cs#L36
Special characters considered as Operators in this case.

Also, issue with comma is in regexp for filters:
https://github.com/Biarity/Sieve/blob/master/Sieve/Models/SieveModel.cs#L35

These fixes require a lot of improvements in the library logic, and it will be great if you add support for special characters.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions