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

JavaScript escaping is wrong #2

Closed
SimenB opened this issue Apr 23, 2015 · 2 comments
Closed

JavaScript escaping is wrong #2

SimenB opened this issue Apr 23, 2015 · 2 comments

Comments

@SimenB
Copy link

SimenB commented Apr 23, 2015

E.g. http://api.icndb.com/jokes/537?escape=javascript
It escapes ', which is wrong.

I do not know any PHP, so I can't provide a PR, but I found this http://www.pontikis.net/tip/?id=5

EDIT: For anyone finding this, and using JavaScript

JSON.parse(response.replace(/\\'/g, '\''));
maartendecat added a commit that referenced this issue May 5, 2015
@maartendecat
Copy link
Owner

Hi,

I just pushed an update: JavaScript escaping indeed escaped too much. It should be fixed now, can you verify?

Regards and thanks for reporting

@SimenB
Copy link
Author

SimenB commented May 5, 2015

Yup, works fine now. Thanks!

@SimenB SimenB closed this as completed May 5, 2015
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