News for hackers. Stuff that matters.
Re:HTML5 Security Cheatsheet: What your browser does when yo... by tptacek on Friday November 16, 2012 @01:59PM (#4795302)
The right way to handle this problem is to scrape the content out of the incoming HTML, do a best-effort pass at remembering the formatting rules expressed in it, entity-encode everything, and regenerate the HTML markup from scratch.

It is never a good idea to accept HTML from a client, attempt to clean it up, and then pass it directly into the DOM of a server-generated page.

There are no comments on this comment yet.