From b6fc7ca89d8ac0fea48fc4f3b7862cb9ea1e0687 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Mon, 18 Mar 2013 03:14:30 +0800 Subject: [PATCH] Fix broken entity removal in post truncation. --- inc/display.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/display.php b/inc/display.php index 6d8cf366..90764b43 100644 --- a/inc/display.php +++ b/inc/display.php @@ -204,7 +204,7 @@ function truncate($body, $url, $max_lines = false, $max_chars = false) { } } else { // remove broken HTML entity at the end (if existent) - $body = preg_replace('/&[^;]+$/', '', $body); + $body = preg_replace('/&[^;]*$/', '', $body); } $body .= 'Post too long. Click here to view the full text.';