use simplejson to escape string for javascript