1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 07:35:29 +02:00

fix issue with HTML parsing and nasty on/style tags + incorrect matching of allowed tags

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3513 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-02-23 00:54:46 +00:00
parent 4b3714ee8f
commit 5c40eb6b78

View File

@ -72,9 +72,9 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
if (preg_match('#^<\/?' . $match_tag . '(?!(.*?)((style)|( on[\w]+?[\s]?=))[\s]*?)#i', $hold_string))
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
$tagallowed = true;
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true;
}
}