From 57dd45839b3ed61fc38b15621b688b088f57b04f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 15 Jun 2015 20:30:30 -0400 Subject: Use css to truncate the page title --- app/Helper/Text.php | 4 ++-- app/Template/layout.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/Helper/Text.php b/app/Helper/Text.php index cfb557b1..790fc411 100644 --- a/app/Helper/Text.php +++ b/app/Helper/Text.php @@ -51,10 +51,10 @@ class Text extends \Core\Base */ public function truncate($value, $max_length = 85, $end = '[...]') { - $length = strlen($value); + $length = mb_strlen($value); if ($length > $max_length) { - return substr($value, 0, $max_length).' '.$end; + return mb_substr($value, 0, $max_length).' '.$end; } return $value; diff --git a/app/Template/layout.php b/app/Template/layout.php index 989afe18..0d9326f4 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -38,7 +38,7 @@