mirror of
https://github.com/getgrav/grav.git
synced 2026-07-06 07:08:57 +02:00
Handle multibyte strings in truncateLetters (#2007)
This commit is contained in:
committed by
Andy Miller
parent
9053f9ab44
commit
f883820c6a
@@ -113,7 +113,7 @@ class Truncator {
|
||||
if ($letters->key() >= $limit) {
|
||||
|
||||
$currentText = $letters->currentTextPosition();
|
||||
$currentText[0]->nodeValue = substr($currentText[0]->nodeValue, 0, $currentText[1] + 1);
|
||||
$currentText[0]->nodeValue = mb_substr($currentText[0]->nodeValue, 0, $currentText[1] + 1);
|
||||
self::removeProceedingNodes($currentText[0], $body);
|
||||
|
||||
if (!empty($ellipsis)) {
|
||||
|
||||
Reference in New Issue
Block a user