[vengeance]
09-02-2009, 01:40 PM
Hello.
I'm coding a form where people can post whatever they want to - HTML is allowed! However there are these simple META HTML redirects, which I want to block.
So I store the posted information in a variable called $postContent. And then I want to check with a regular expression whether if the user posted something along with:
<META HTTP-EQUIV=Refresh CONTENT="2; URL=http://badwebsite.com">
I'm not really familiar with regular expressions, so any help/explanation of code is appreciated.
And my question is - is there any other harmful codes written in HTML, that I should be aware of?
I know allowing everyone to do HTML isn't that great of an idea, but I want/need it to be that way.
I'm coding a form where people can post whatever they want to - HTML is allowed! However there are these simple META HTML redirects, which I want to block.
So I store the posted information in a variable called $postContent. And then I want to check with a regular expression whether if the user posted something along with:
<META HTTP-EQUIV=Refresh CONTENT="2; URL=http://badwebsite.com">
I'm not really familiar with regular expressions, so any help/explanation of code is appreciated.
And my question is - is there any other harmful codes written in HTML, that I should be aware of?
I know allowing everyone to do HTML isn't that great of an idea, but I want/need it to be that way.