Reputation: 15922
Is there a Javascript equivalent of libraries like HTMLPurifier, which remove XSS code from strings?
Upvotes: 3
Views: 874
Reputation: 231223
Generally speaking, by the time Javascript code is running, it's too late to protect yourself against an XSS attack. You need to protect against it at the server, not the client.
Upvotes: 7