1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

UTF-8 slugs & UI fixes

This commit is contained in:
Michael Mullins
2018-09-11 22:42:25 +04:00
parent 9d09c4c7b0
commit e0b479efef
5 changed files with 14 additions and 13 deletions

View File

@@ -168,10 +168,10 @@ class Entity extends Ownable
*/
public function getShortName($length = 25)
{
if (strlen($this->name) <= $length) {
if (mb_strlen($this->name) <= $length) {
return $this->name;
}
return substr($this->name, 0, $length - 3) . '...';
return mb_substr($this->name, 0, $length - 3) . '...';
}
/**