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

Library should escape about values when building fluiddb/about queries #98

Open
terrycojones opened this issue Oct 18, 2012 · 0 comments

Comments

@terrycojones
Copy link
Member

There are two places in the code where queries are built involving fluiddb/about wherein the about value should have backslashes and double-quotes escaped before wrapping them in another set of double quotes. Instead of

query = 'fluiddb/about = "' + options.about + '"';

I think it should be

query = 'fluiddb/about = "' + options.about.replace(/\\/g, '\\\\').replace(/"/g, '\\"' + '"';

Unfortunately this will break code that is compensating for this bug by sending in already-escaped about values. But I think it should be fixed properly here.

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