Add overloads in HtmlUtils to allow for encoding aware behavior.

Based on the encoding, in many cases, many characters do not need to be transformed into entities.
For instance, when the encoding is UTF-8, there are only 5 characters that needs to become entities
and shouldn't appear in their literal forms.

See SPR-9293