stuffradio Posted November 23, 2007 Share Posted November 23, 2007 What are the best things to use to protect me from all XSS attacks? A website told me to use the following: urlencode htmlentities Is there anything else I should use? If so... when should I use them? Thanks Link to comment https://forums.phpfreaks.com/topic/78606-sanitizing-input/ Share on other sites More sharing options...
helraizer Posted November 23, 2007 Share Posted November 23, 2007 The way I did it (from what I've learnt only today thanks to the beta-testing forum ) is use htmlspecialchars and htmlspecialchars_decode. It converts the symbols " ' < > & to " ' < > & - so then they can't use "> to close you input tag. Link to comment https://forums.phpfreaks.com/topic/78606-sanitizing-input/#findComment-397751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.