0

I have noticed this strange behaviour with angular slickgrid where if a search query contains some of special characters like "<" ">" "!" "*", it fails to encode them. Any idea why this strange behaviour is noticed and how to fix it?

Thanks in advance!

Sekiro
  • 1,537
  • 1
  • 7
  • 21
  • There's no strange behavior in that, in 5 years of using my lib I never had any issue with these chars and I don't see the need for encoding them since it's used directly by JS/TS not html, so why would I encode it if I can skip that? As you may know (or not), these chars are special in the text filter and are considered while executing the filtering. What would be your use case to encode it if it's not used/displayed directly to raw html? Please mention your use case and/or encode it yourself because I don't see the need to add encoding when it's not needed – ghiscoding Apr 21 '22 at 15:41
  • heres the complete picture, say i try to filter a column with the char "#", the query passed to process() method of serviceAPI contains "%23", but if the same operation is performed with "!", the query doesnt contain any encoding.. am i missing anything here? – Sekiro Apr 22 '22 at 05:32
  • 1
    I tried with regular grid and added some string with # sign and it's working fine, unless you're using a BackendServiceApi (OData/GraphQL) and if so then which one since you didn't mention that!? Trying w/OData then yes # is encoded because OData query have to be encoded, however <,>,!,*,=,!= are not because they are special chars extracted & interpreted by Service to build the query **before** sending the final query, special chars won't appear in final query and # is not considered a special chars. It might be better to talk over this in a "Discussion" in GitHub project instead of here. – ghiscoding Apr 22 '22 at 14:12
  • yes, im using OData and thanks for the insight. – Sekiro Apr 25 '22 at 05:12
  • [github](https://github.com/ghiscoding/Angular-Slickgrid/discussions/895) discussion thread – Sekiro Apr 25 '22 at 05:44

0 Answers0