Jump to content
MakeWebGames

Recommended Posts

Posted

Hey all,

I am look for somesort of preg replace which will replace html symbols and convert them in to something else to avoid hacks attempts in input boxex ect..

Posted

htmlspecialchars is what most McC users go with as it still allows some of the basic html tags, where as htmlentities removes pretty much all of them. Good for output you want NOTHING but characthers displayed as.

For integers obviously use ctype_digit or even abs((int).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...