PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
This code effectively makes data safe for passing along to the database. However I have a problem in that the allowed tags for strip_tags (img and blockquote) can have any attribute fastened to them. What worries me is javascript event handlers like onmouseover, etc. Is there a way to strip all attributes from a tag? With the exception of class='code' for the blockquote tag.
what, you expect us to give complete fully working and tested answers to all your questions? You're supposed to learn things here. Not find answers too all things.
That is extremely vague. There are complex books written on regular expressions. I need an idea of where to go. I do not expecting fully functional written code.
As for me, when I know an answer to someone's question, I post an exact working code that will match their situation. Show them by doing. That's how I learn. So while I agree with your idea that people need to learn, I dissagree with how you do it.