Xtremer360 Posted April 16, 2011 Share Posted April 16, 2011 What do most people prefer to use? htmlspecialchars or htmlentities Link to comment https://forums.phpfreaks.com/topic/233911-htmlspecialchars-vs-htmlentities/ Share on other sites More sharing options...
gizmola Posted April 16, 2011 Share Posted April 16, 2011 The 2 functions are identitcal, with the only exception being that htmlspecialchars only converts a small subset of characters to their html entity equivalent. It is basically a safety function for preventing attempted xss or sql injections. htmlentities converts any character that has an html entity equivalent. Link to comment https://forums.phpfreaks.com/topic/233911-htmlspecialchars-vs-htmlentities/#findComment-1202400 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.