aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_posting.php34
-rw-r--r--phpBB/includes/message_parser.php2
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', '&lt;$1$2&gt;', $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', '&lt;$1$2&gt;', $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);
}