Cross-site scripting (XSS) defense

J

johnzenger

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.
 
L

Lee Harr

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.


I use Strip-o-Gram:
http://www.zope.org/Members/chrisw/StripOGram

It is used quite a bit in Zope, but I believe it
will also stand on its own.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top