Fixed & handling with HTML enabled and no tags

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4102 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-06-09 19:35:56 +00:00
parent a2c007ca0a
commit 362830e86a

View file

@ -74,7 +74,7 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
$match_tag = trim($allowed_html_tags[$i]);
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true;
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[\t ]*?=|on[\w]+[\t ]*?=)#i', $hold_string)) ? false : true;
}
}
@ -91,7 +91,7 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
}
}
if ($end_html != strlen($message) && $tmp_message != '')
if (!$end_html || ($end_html != strlen($message) && $tmp_message != ''))
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1));
}