Revert XSS fix; seems to break things

Need to revisit this fix; seems to introduce an issue.