Browse Source

fix multi-byte string processing

PHP-GTK3
yggverse 7 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
if ($value) if ($value)
{ {
$title = urldecode( $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 : $value
); );
} }

4
src/Entity/Tab/Page.php

@ -640,8 +640,8 @@ class Page
if ($value) if ($value)
{ {
$title = urldecode( $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 : $value
); );
} }

Loading…
Cancel
Save