How can I modify the code below to accept tbody tags inside a post (such as Submit News)? I'm using Spaw editor on my site and whenever a table is created in a post, tbody tags are inserted automatically. Submitting the post with the tags gets caught up in the die($htmltags) function. Without the tags, it works fine.
Sorry, I don't know enough php to understand what all the symbols after eregi are for. I'm guessing it's a wildcard. I should also state that I do wish to continue catching the body tag with the die() function.
Code:
foreach ($_POST as $secvalue) {
if ((eregi("<[^>]*onmouseover*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]script*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*body*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]style*\"?[^>]*>", $secvalue)))
{
die ($htmltags);
}
}
Kirt Nuke Cadet
Joined: Oct 24, 2006
Posts: 4
Posted:
Wed Jun 04, 2008 3:15 pm
Found a solution after some messing around with it.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum