Fixed emoji transformations.
- Transform to html after encoding.
- Centralize encoding.

Fixes #662.