sanitizing html with python
by
Jörg Baach
—
last modified
Mar 07, 2011 05:24 PM
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