Move character escaping from the model contents, to the output helpers.