469,362 Members | 2,498 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

How to make xss safe strings

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
Aug 21 '08 #1
1 1118
On Aug 20, 10:10*pm, Roopesh <roopesh....@gmail.comwrote:
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.
Aug 21 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

95 posts views Thread by hstagni | last post: by
4 posts views Thread by barcaroller | last post: by
3 posts views Thread by Torsten Bronger | last post: by
18 posts views Thread by Verde | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.