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

Android: Escape JS string before passing it to eval() #27

Merged
merged 1 commit into from
Dec 25, 2020

Conversation

dapetcu21
Copy link
Contributor

@dapetcu21 dapetcu21 commented Dec 25, 2020

Previously you couldn't eval JS code that contained quotes, for example, since that would close the string quotes of the string literal passed to eval().

This PR properly escapes the passed JS string according to the JSON spec. This also matches iOS behaviour.

Copy link
Contributor

@britzl britzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@britzl britzl merged commit 8c265e4 into defold:master Dec 25, 2020
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

Successfully merging this pull request may close these issues.

2 participants