Jump to content

htmlspecialchars vs. htmlentities


Xtremer360

Recommended Posts

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. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.