Fix a bug where the text state only escaped spaces, and nother other
characters.