escape control characters in results