Output results as plaintext when a raw response is requested
Add some escaping functions