Added chat message sanitization and a test to check it. Resolves #17.