diff --git a/root/includes/trim_message/bbcodes.php b/root/includes/trim_message/bbcodes.php index 05d3bf669..cbb369705 100644 --- a/root/includes/trim_message/bbcodes.php +++ b/root/includes/trim_message/bbcodes.php @@ -364,7 +364,8 @@ static public function get_content_length($content) $content_length = utf8_strlen($content); $last_smiley = false; $last_html_opening = $last_html_closing = 0; - while (($last_html_opening = utf8_strpos($content, '<', $last_html_closing)) !== false) + while (($last_html_opening = utf8_strpos($content, '<', $last_html_closing)) !== false && + utf8_strpos($content, '>', $last_html_opening) !== false) { $last_html_closing = utf8_strpos($content, '>', $last_html_opening); if (($smiley_code = utf8_substr($content, $last_html_opening + 7, ($last_html_closing - $last_html_opening - 11))) != '--')