rails/rails — pull request #15693 by pdg137 (2014-06-13 18:19:17+00:00)
Title: In enforce_utf8, generate the actual Unicode character instead of a handcoded HTML escape

This saves us a call to html_safe and lets `tag` decide whether or not to escape the character (currently it does not, which is fine). Should also save a few bytes in the generated HTML.

My motivation here is that there is no need for anyone to attempt to HTML-encode strings before passing them as tag values, since:

1. Your code should have access to the actual string value of any parameter, not the encoded version.
2. You should not care about the exact encoding as HTML.
3. Thinking about how to safely encode strings is hard, and `tag` already does a fine job.

I would like to fix the few places where Rails itself does this, so that I can more easily verify during testing that my own code does not do this.