Handle html_safe input/output with escaping.

* Escape strings not marked html_safe?
* Mark outgoing strings html_safe