From 7ac9260ba794fe8e553a6c87bc493769c835e586 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 14 Apr 2024 14:51:12 +0300 Subject: [PATCH] fix multi-byte string processing --- src/Entity/App.php | 4 ++-- src/Entity/Tab/Page.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Entity/App.php b/src/Entity/App.php index 57688534..92f07ba2 100644 --- a/src/Entity/App.php +++ b/src/Entity/App.php @@ -158,8 +158,8 @@ class App if ($value) { $title = urldecode( - strlen($value) > $this->config->header->title->length->max ? substr($value, 0, $this->config->header->title->length->max) . '...' - : $value + mb_strlen($value) > $this->config->header->title->length->max ? mb_substr($value, 0, $this->config->header->title->length->max) . '...' + : $value ); } diff --git a/src/Entity/Tab/Page.php b/src/Entity/Tab/Page.php index 886b07ad..15b21f6c 100644 --- a/src/Entity/Tab/Page.php +++ b/src/Entity/Tab/Page.php @@ -640,8 +640,8 @@ class Page if ($value) { $title = urldecode( - strlen($value) > $this->config->title->length->max ? substr($value, 0, $this->config->title->length->max) . '...' - : $value + mb_strlen($value) > $this->config->title->length->max ? mb_substr($value, 0, $this->config->title->length->max) . '...' + : $value ); }