Simple allowing of HTML elements/attributes?

Leif K-Brooks eurleif at ecritters.biz
Wed Feb 11 06:02:17 EST 2004


I'm writing a site with mod_python which will have, among other things, 
forums. I want to allow users to use some HTML (<em>, <strong>, <p>, 
etc.) on the forums, but I don't want to allow bad elements and 
attributes (onclick, <script>, etc.). I would also like to do basic 
validation (no overlapping elements like <strong><em>foo</em></strong>, 
  no missing end tags). I'm not asking anyone to write a script for me, 
but does anyone have general ideas about how to do this quickly on an 
active forum?



More information about the Python-list mailing list