doubledee Posted August 21, 2011 Author Share Posted August 21, 2011 Debbie, please reread the stuff above , and notice the difference between validating and sanitizing. Again DONT use regex if you don't need to. php has htmlspecialchars() and htmlentities for a reason. Just look up in the manual or for the sake of it any security guide. What you wont find there is regex. regex is used for instance to check if an email address is valid... But if you want to, please do I do not mind. Pretty much all examples are given and it should be clear now. I agreed with you above... (In fact, it was me that decided maybe I should stop using RegEx for certain fields...) Debbie Quote Link to comment https://forums.phpfreaks.com/topic/245314-best-regex-for-comments-field/page/2/#findComment-1260311 Share on other sites More sharing options...
doubledee Posted August 21, 2011 Author Share Posted August 21, 2011 Exactly, I don't see how you learn anything by just installing a class to do everything for you. Doubledee, do it yourself, then compare your method with other methods and see what you could improve on. Real security issues are past this validating and sanitizing stuff in my opinion... And all of this HTMLPurifer talk - while good - was somewhat off-topic to my original thread, and to my agreeing with cssfreakie. (*nudge* cssfreakie) Debbie Quote Link to comment https://forums.phpfreaks.com/topic/245314-best-regex-for-comments-field/page/2/#findComment-1260313 Share on other sites More sharing options...
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.