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

Escaping operators #70

Open
Halt001 opened this issue Aug 8, 2017 · 0 comments
Open

Escaping operators #70

Halt001 opened this issue Aug 8, 2017 · 0 comments

Comments

@Halt001
Copy link

Halt001 commented Aug 8, 2017

Hi, I've been playing a little with your lib but I found no way of escaping operators that occur in the first part of the values. For example, what would be the querystring for the following output:
{"foo":"!baz"}.

I've tried:
?foo=!baz => {"foo":{"$ne":"baz"}} (duh)
?foo=%21baz => {"foo":{"$ne":"baz"}} (ExpressJS resolves %21 before your lib sees it)
?foo=%27!baz%27 => {"foo":"'!baz'"} same problem, resolved by ExpressJS

But even without ExpressJS in between % escaping it doesn't seem to work.

P.S. Like another poster I would also like to combine the whole expression into one q=... parameter, otherwise it would cause conflicts with other meaningful parameters like page, limit etc.

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

1 participant