Connecting Tech Pros Worldwide Help | Site Map

How to make xss safe strings

Roopesh
Guest
 
Posts: n/a
#1: Aug 21 '08
Hi,

How can I make a string XSS safe? Will
simply .replace('<','&lt;').replace('>','&gt;').... 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.

Regards
Roopesh
Dan Bishop
Guest
 
Posts: n/a
#2: Aug 21 '08

re: How to make xss safe strings


On Aug 20, 10:10*pm, Roopesh <roopesh....@gmail.comwrote:
Quote:
Hi,
>
How can I make a string XSS safe? Will
simply .replace('<','&lt;').replace('>','&gt;').... 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.
Closed Thread