Ensuring all strings are character escaped.

Fixes #2595