Originally Posted by abduraooft
, if don't want to allow people for posting any html content.
That would keep legitimate users from entering certain characters even in appropriate ways ("<" and ">" come to mind). Depending on the OP's needs this might be overkill. Instead, htmlspecialchars would still include those restricted characters, but would just encode them so they are viewable but not parsed.
Then again, if we're only concerned about meta refresh tags then a regular expression search and replace of the post might prove to be the most useful option of all.
But we still don't know yet if OP is even using PHP...