From 362830e86af0e4d73242081fd68037bf5abedc11 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 9 Jun 2003 19:35:56 +0000 Subject: [PATCH] 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 --- phpBB/includes/functions_post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php index 9328e8fa45..eb2c8e684b 100644 --- a/phpBB/includes/functions_post.php +++ b/phpBB/includes/functions_post.php @@ -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)); }