Fix various XSS vulnerabilities