OpendataCH / Transport

Swiss public transport API
http://transport.opendata.ch/
MIT License
241 stars 50 forks source link

fixing incorrect single quote escaping in JSON #89

Closed dragoon closed 11 years ago

dragoon commented 11 years ago

Fix for a part of issue #87. What happened there is that Browser returns incorrectly escaped JSON. It escapes single quotes everywhere with a backslash, which is considered an error according to JSON specification (see first answer here for clarification http://stackoverflow.com/questions/2275359/jquery-single-quote-in-json-response).

This error leads to a large number of location queries to return errors, virtually every location that has a station name with a single quote nearby.

fabian commented 11 years ago

Thanks for finding this! I was able to reproduce the problem in 7d6b2c8d387075ff37f3a173cc4a000568613528: https://travis-ci.org/OpendataCH/Transport/jobs/10143570

Prove this fixed it: https://travis-ci.org/OpendataCH/Transport/jobs/10143589