Rails escape_javascript creates invalid JSON with single quotes
- by Arrel
The escape_javascript method in ActionView escapes the apostrophe ' as backslash apostrophe \', which gives errors when parsing as JSON.
Is there a patch to fix this, or an alternate way to escape strings when printing to JSON?