Browse Source

fix multi-byte string processing

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

2
src/Entity/App.php

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

2
src/Entity/Tab/Page.php

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

Loading…
Cancel
Save