[Bug 840442] fix all XSS vulnerabilities [r=crdlc]
Merge pull request #8326 from EverythingMe/xss-fix

[Bug 840442] fix all XSS vulnerabilities [r=crdlc]