How to make xss safe strings

Dan Bishop danb_83 at yahoo.com
Wed Aug 20 23:58:45 EDT 2008


On Aug 20, 10:10 pm, Roopesh <roopesh.... at gmail.com> wrote:
> Hi,
>
> How can I make a string XSS safe? Will
> simply .replace('<','<').replace('>','>').... do the work? Or
> are there some other issues to take into account?. Is there already a
> function in python which will do this for me.

For HTML, use the cgi.escape function.



More information about the Python-list mailing list