Home

sanitizing html with python

Updated:
Created:

I need to sanititze html input before rendering on a page. Use case is a rich text editor. How can I prevent xss attacks?

A search for 'htmllaundry xss' it didn't show good examples, and the tests don't seem to cover lots of attacks, so I am not too sure about it.

Most informative (but somewhat old) google hit so far:

http://stackoverflow.com/questions/16861/sanitising-user-input-using-python