Jump to content

Best Regex for Comments field


doubledee

Recommended Posts

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

 

 

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

 

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.