Escape HTML before writing it to the HTML logfile