Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing strings with special character failures #20

Open
erickakoyama opened this issue Apr 16, 2019 · 3 comments
Open

Parsing strings with special character failures #20

erickakoyama opened this issue Apr 16, 2019 · 3 comments

Comments

@erickakoyama
Copy link

erickakoyama commented Apr 16, 2019

Hi, thanks for the parsing functions ⚡️ . I am parsing a filter odata string like this and receiving parser errors for special characters in certain strings. For example:

  1. Fails when a hash mark is in the string
    activities/last7Days eq 'Page#pageViewed#343521056969328528'

  2. Fails when a '%' is in any side but '/' is ok
    activities/Page/pageViewed%012345 lt '2018-07-08T:09:30:00.000Z'

  3. Fails when a '/' is in any side but '%' is ok
    count(foo='activities/Page%23pageViewed%23012345 lt 2018-07-08T:09:30:00.000Z',bar='gt',baz=100)'

Here is a codesandbox with the test: https://codesandbox.io/embed/618478m2vn

Is there a recommendation for what we can do to handle these cases? Thank you very much 🙏

Version: 0.1.29

@erickakoyama erickakoyama changed the title Parse an Edm.string that contains a '#' Parsing strings with special character failures Apr 17, 2019
@flashtheman
Copy link

Just noticed the same with the following example: Field ne 'yes/no'

@ashutoshns
Copy link

Did you find any workaround for this?

@kienD
Copy link

kienD commented Apr 5, 2021

Did you find any workaround for this?

We got around it by just replacing the special characters with a placeholder value before passing it through the odata parser and then finding the value and replacing it with the original char after. It's not a perfect solution but it works.

e.g. ? with __SOMETHINGQUESTIONMARK__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants