1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-25 16:00:22 +01:00

Fix broken entity removal in post truncation.

This commit is contained in:
Macil Tech 2013-03-18 03:14:30 +08:00
parent 821f40a794
commit 66965b3655

View File

@ -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 .= '<span class="toolong">Post too long. Click <a href="' . $url . '">here</a> to view the full text.</span>';