CE-1175 Fix various XSS vulnerabilities

Fix various XSS vulnerabilities through proper sanitization. See the individual commits
for descriptions of the issues and fixes.

Reviewed in https://github.com/Wikia/app/pull/5703