mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-20 04:31:23 +01:00
pm_snippet bugfix (incorrectly double-escaped HTML entity)
This commit is contained in:
parent
c6abc7b9c7
commit
5e02493e6b
@ -116,10 +116,13 @@
|
||||
// Unescape HTML characters, to avoid splitting them in half
|
||||
$body = html_entity_decode_utf8($body);
|
||||
|
||||
$body = substr($body, 0, $len) . (strlen($body) > $len ? '…' : '');
|
||||
// calculate strlen() so we can add "..." after if needed
|
||||
$strlen = strlen($body);
|
||||
|
||||
$body = substr($body, 0, $len);
|
||||
|
||||
// Re-escape the characters.
|
||||
return '<em>' . utf8tohtml($body) . '</em>';
|
||||
return '<em>' . utf8tohtml($body) . ($strlen > $len ? '…' : '') . '</em>';
|
||||
}
|
||||
|
||||
function capcode($cap) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user