Fix broken entity removal in post truncation.
This commit is contained in:
parent
be1e55b9d6
commit
b6fc7ca89d
@ -204,7 +204,7 @@ function truncate($body, $url, $max_lines = false, $max_chars = false) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// remove broken HTML entity at the end (if existent)
|
// 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>';
|
$body .= '<span class="toolong">Post too long. Click <a href="' . $url . '">here</a> to view the full text.</span>';
|
||||||
|
Loading…
Reference in New Issue
Block a user