diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-03-01 15:24:26 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-03-01 15:24:26 +0000 |
commit | facd75bc44ec62b76f63c64158d094ab8ef09d1f (patch) | |
tree | 6ac4a27c438feae184ef975d82d8dbf85e782d89 /phpBB/includes | |
parent | 7558d522b1d42f7f19165b5f94aadb4dc3866011 (diff) | |
download | forums-facd75bc44ec62b76f63c64158d094ab8ef09d1f.tar forums-facd75bc44ec62b76f63c64158d094ab8ef09d1f.tar.gz forums-facd75bc44ec62b76f63c64158d094ab8ef09d1f.tar.bz2 forums-facd75bc44ec62b76f63c64158d094ab8ef09d1f.tar.xz forums-facd75bc44ec62b76f63c64158d094ab8ef09d1f.zip |
small fix for html replacement
git-svn-id: file:///svn/phpbb/trunk@4849 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_posting.php | 34 | ||||
-rw-r--r-- | phpBB/includes/message_parser.php | 2 |
2 files changed, 14 insertions, 22 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 26c81cc9d5..23bcbd25d4 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -101,10 +101,6 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $ $message = smilie_text($message, !$smilies); // Replace naughty words such as farty pants -/* if (sizeof($censors)) - { - $message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $message . '<'), 1, -1)); - }*/ $message = str_replace("\n", '<br />', censor_text($message)); // Signature @@ -115,10 +111,6 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $ $bbcode->bbcode_second_pass($signature, $siguid); $signature = smilie_text($signature); -/* if (sizeof($censors)) - { - $signature = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $signature . '<'), 1, -1)); - }*/ $signature = str_replace("\n", '<br />', censor_text($signature)); } else @@ -541,19 +533,6 @@ function decode_text(&$message, $bbcode_uid) $message = ($bbcode_uid) ? str_replace($search, $replace, $message) : str_replace('<br />', "\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( '#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#', '#<!\-\- m \-\-><a href="(.*?)" target="_blank">.*?</a><!\-\- m \-\->#', @@ -574,6 +553,19 @@ function decode_text(&$message, $bbcode_uid) $message = preg_replace($match, $replace, $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); + } + } + return; } diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 9fc85b683f..364855ebb8 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -100,7 +100,7 @@ class parse_message // Parse URL's $this->magic_url($url); - + return implode('<br />', $this->warn_msg); } |