rails/rails — pull request #13646 by jenseng (2014-01-09 04:48:26+00:00)
Title: Make the result of json_escape always html-safe

The escaping behavior of json_escape was fixed in #13073, but you still have to `raw` the return value in order to avoid the dreaded `"`s blowing up your javascript. That conflicts with an explicit doc change in the very same commit, and was most likely an oversight.

This commit essentially reverts 0b022845, and also always flags the result as html-safe. Per the docs, you should *not* put the raw result of json_escape in an HTML attribute, as double-quotes are left as-is and can break your layout.

/cc @chancancode @jeremy @tenderlove