fix multi-byte string processing

This commit is contained in:
yggverse 2024-04-14 14:51:12 +03:00
parent 9bea4fe4a1
commit 7ac9260ba7
2 changed files with 4 additions and 4 deletions

View file

@ -158,7 +158,7 @@ class App
if ($value)
{
$title = urldecode(
strlen($value) > $this->config->header->title->length->max ? substr($value, 0, $this->config->header->title->length->max) . '...'
mb_strlen($value) > $this->config->header->title->length->max ? mb_substr($value, 0, $this->config->header->title->length->max) . '...'
: $value
);
}

View file

@ -640,7 +640,7 @@ class Page
if ($value)
{
$title = urldecode(
strlen($value) > $this->config->title->length->max ? substr($value, 0, $this->config->title->length->max) . '...'
mb_strlen($value) > $this->config->title->length->max ? mb_substr($value, 0, $this->config->title->length->max) . '...'
: $value
);
}