Dustin Mitchell
dustin at ywlcs.org
Mon Jun 2 11:02:29 EST 2003
On Mon, Jun 02, 2003 at 05:11:34PM +0200, tohmas ash wrote: > Hi, it's again me with some php-to-mod_python problems :) > > I use some 'forms' and went a user put some html tags into inputs that > put my html pages in a big mess... > > like in my last query, in know how to stop this problem in php with > the fonction 'htmlentities' but I didn't found something like that for > mod_python. If you import the Python cgi module (don't use its FormData class!!), it has a function 'escape' which does what you'd like. Perhaps this is a candidate for inclusion in mod_python's utils module? Dustin -- Dustin Mitchell dustin at ywlcs.org/djmitche at alumni.uchicago.edu http://people.cs.uchicago.edu/~dustin/
|