SHAD Posted January 2, 2011 Posted January 2, 2011 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.. Quote
Dominion Posted January 3, 2011 Posted January 3, 2011 A simple BB code support as well as filtering the HTML That? Quote
Djkanna Posted January 3, 2011 Posted January 3, 2011 Just a thing um htmlentities()? Or htmlspecialchars()? Or even strip_tags() Quote
Joshua Posted January 3, 2011 Posted January 3, 2011 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). Quote
Danny696 Posted January 3, 2011 Posted January 3, 2011 Personally, i would use strip_tags, it removes PHP tags, aswell as all HTML tags Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.