Browse Source

fix multi-byte string processing

PHP-GTK3
yggverse 8 months ago
parent
commit
7ac9260ba7
  1. 4
      src/Entity/App.php
  2. 4
      src/Entity/Tab/Page.php

4
src/Entity/App.php

@ -158,8 +158,8 @@ class App @@ -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
);
}

4
src/Entity/Tab/Page.php

@ -640,8 +640,8 @@ class Page @@ -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
);
}

Loading…
Cancel
Save