471,831 Members | 770 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,831 software developers and data experts.

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 1152
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.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.