Filter input based on white list.
Posted: Fri Oct 07, 2011 3:14 pm
Here is my situation,
I have a form input. I want people to be able to use some HTML tags, ie img, strong, h1, etc. but I want to filter out dangerous tags, ie script etc.
Basically I want people to be able to use certain tags that are not potentially harmful.
What is the best way to do this?
Thanks.
I have a form input. I want people to be able to use some HTML tags, ie img, strong, h1, etc. but I want to filter out dangerous tags, ie script etc.
Basically I want people to be able to use certain tags that are not potentially harmful.
What is the best way to do this?
Thanks.