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!

5
  • 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 Commented Apr 21, 2022 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? Commented Apr 22, 2022 at 5: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. Commented Apr 22, 2022 at 14:12
  • yes, im using OData and thanks for the insight. Commented Apr 25, 2022 at 5:12
  • github discussion thread Commented Apr 25, 2022 at 5:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.