Ensure the message is not ANSI escaped

Closes #2496.