Patch to fix JSON control character encoding bug (#3345 "to_json does not escape unicode characters")

Hi there!

I've attached a patch that makes ActiveSupport::JSON escape the control characters \x00-\x1f, per RFC 4627.

There are two versions of the patch: One against 2-3-stable, and one against master (there's no real difference between them, but git-am seems to be very picky).

See the ticket at:

- Dwayne

Dwayne Litzenberger
Lead Healthcare IT Developer, Infonium Inc.
Office +1-613-722-0711 x29
Toll-free +1-866-674-4494 x29

activesupport-json-encode-control-chars-fix.2-3-stable.diff (3.29 KB)

activesupport-json-encode-control-chars-fix.master.diff (3.29 KB)