Cross-site scripting (XSS) defense

johnzenger at gmail.com johnzenger at gmail.com
Fri Jun 16 13:57:01 EDT 2006


Is there a module (or, better yet, sample code) that scrubs
user-entered text to remove cross-site scripting attacks, while also
allowing a small subset of HTML through?

Contemplated application: a message board that allows people to use
<b>, <a href="">, <i> and so on, but does not allow any javascript,
vbscript, or other nasties.




More information about the Python-list mailing list