aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 4e788a0d84..2b2a1a3194 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -480,7 +480,6 @@ for($i = 0; $i < $total_posts; $i++)
$user_sig = htmlspecialchars($user_sig);
}
$message = htmlspecialchars($message);
-// $message = str_replace('&amp;', '&', $message);
}
if($board_config['allow_bbcode'] && $bbcode_uid != "")
@@ -493,6 +492,20 @@ for($i = 0; $i < $total_posts; $i++)
}
$message = bbencode_second_pass($message, $bbcode_uid);
+
+ //
+ // This compensates for bbcode's rather agressive (but I guess necessary)
+ // HTML handling
+ //
+ if(!$postrow[$i]['enable_html'] || ($postrow[$i]['enable_html'] && !$board_config['allow_html']) )
+ {
+ $message = preg_replace("'&amp;'", "&", $message);
+ }
+ }
+ else
+ {
+ // Removes UID from BBCode entries
+ $message = preg_replace("/\:[0-9a-z\:]+\]/si", "]", $message);
}
$message = make_clickable($message);