escape XML characters in test output