Magnus Holm did a great job describing this after he fixed the problem in Rack::JSONP. Good reference as well for those interested in the topic:
It doesn't look like http://es5.github.com/#Quote has anything to do with serializing to JSON string--am I missing something?