Html encoding message in log detail. Closes #1024.