Rewrites HTML client to work with content security policies (http://en.wikipedia.org/wiki/Content_Security_Policy)