diff --git a/include/text.php b/include/text.php
index 2ec017caf..6c0916749 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1412,15 +1412,24 @@ function apply_content_filter($html, array $reasons)
{
if (count($reasons)) {
$rnd = random_string(8);
- $content_filter_html = '
';
- foreach ($reasons as $reason) {
- $content_filter_html .= '- ' . htmlspecialchars($reason) . '
' . PHP_EOL;
+
+ if (count($reasons) > 1) {
+ $content_filter_html = '';
+ foreach ($reasons as $reason) {
+ $content_filter_html .= '- ' . htmlspecialchars($reason) . '
' . PHP_EOL;
+ }
+ $content_filter_html .= '
+ ';
+ } elseif (count($reasons) == 1) {
+ $reason = array_pop($reasons);
+ $content_filter_html .= '' . htmlspecialchars($reason) . '
';
}
- $content_filter_html .= '
- ';
+
+ $content_filter_html .= '
';
$html = $content_filter_html . $html . '
';
}