From b745d5224f44e447fc5ed06d1804e10b58e7afd2 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 15 Feb 2004 14:03:19 +0000 Subject: removed message type from message parser assign message if specified parse/decode html if enabled validate url git-svn-id: file:///svn/phpbb/trunk@4834 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 2ac76064fe..9a0aa1bd48 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -533,6 +533,7 @@ function decode_text(&$message, $bbcode_uid) ":o:$bbcode_uid", ":$bbcode_uid" ); + $replace = array( "\n", '', @@ -543,6 +544,19 @@ function decode_text(&$message, $bbcode_uid) $message = ($bbcode_uid) ? str_replace($search, $replace, $message) : str_replace('
', "\n", $message); + // HTML + if ($config['allow_html_tags']) + { + // If $html is true then "allowed_tags" are converted back from entity + // form, others remain + $allowed_tags = split(',', $config['allow_html_tags']); + + if (sizeof($allowed_tags)) + { + $message = preg_replace('#\<(\/?)(' . str_replace('*', '.*?', implode('|', $allowed_tags)) . ')\>#is', '<$1$2>', $message); + } + } + $match = array( '#.*?#', '#.*?#', @@ -551,6 +565,7 @@ function decode_text(&$message, $bbcode_uid) '#