Skip to content

JSON interface doesn't return valid JSON Object when page title has quotations in it. Not escaping properly #81

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

Closed
SidBala opened this issue Nov 9, 2014 · 3 comments

Comments

@SidBala
Copy link

SidBala commented Nov 9, 2014

One example is:

The Response Body is:[{
"devtoolsFrontendUrl": "/devtools/devtools.html?host=localhost:1142&page=1",
"faviconUrl": "",
"thumbnailUrl": "/thumb/http://sfbay.craigslist.org/search/ppa?query=air+conditioner+%7C+a%2Fc",
"title": "SF bay area appliances "air conditioner | a/c" - craigslist",
"url": "http://sfbay.craigslist.org/search/ppa?query=air+conditioner+%7C+a%2Fc",
"webSocketDebuggerUrl": "ws://localhost:1142/devtools/page/1"
}]

Notice how the title value has double quotations inside it that are not escaped. This is invalid JSON

@shivshankark
Copy link

I see the same issue. Is there any solution / workaround ?

@SidBala
Copy link
Author

SidBala commented Dec 24, 2014

I directly consume the debug proxy in my application. I simply scan for malformed JSON and correct it in my application.

A more stable solution would be to modify the JSON generator so it correctly escapes quotes.

@artygus
Copy link
Collaborator

artygus commented Jan 18, 2017

should be fixed with 4b9f20f

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

3 participants