Implementing an airtight content security policy can go a long way in terms of protecting a site against XSS attacks.