Jump to content

escaping variables


ricmetal

Recommended Posts

htmlspecialchars or htmlentities. Be aware of the ENT_QUOTES setting (apostrophes are not encoded by default) and the character set parameter (as they both assume ISO 8859-1 unless told otherwise).

Consider writing your own function that calls either using the correct arguments - that way you don't have to remember to do that yourself every time.

Link to comment
https://forums.phpfreaks.com/topic/281748-escaping-variables/#findComment-1447648
Share on other sites

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.