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

backslash is not properly escaped #18

Open
yssrku opened this issue Sep 20, 2023 · 0 comments
Open

backslash is not properly escaped #18

yssrku opened this issue Sep 20, 2023 · 0 comments
Assignees

Comments

@yssrku
Copy link

yssrku commented Sep 20, 2023

_cmd_arg = "".join([" --%s '%s'" % (d, str(kwargs[d]).replace("'", r"\'")) for d in kwargs])

# text is a double quote character
groonga.call("load", table="Docs", values='[{"_key": "mykey", "text": "\\""}]')

When a double quote character is in values JSON string, it is escaped with a preceding backslash.
This backslash is not properly escaped when quoted in a single quote.

@hhatto hhatto self-assigned this Sep 22, 2023
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

2 participants