]> BookStack Code Mirror - bookstack/blobdiff - app/Entity.php
UTF-8 slugs & UI fixes
[bookstack] / app / Entity.php
index 67edec4e089eefe3d4eb69472da891cde409ed81..bc43aae2f8a3adc9a07d80e6e91b29e93dbc87db 100644 (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) . '...';
     }
 
     /**
@@ -197,8 +197,8 @@ class Entity extends Ownable
      * @param $path
      * @return string
      */
-    public function getUrl($path)
+    public function getUrl($path = '/')
     {
-        return '/';
+        return $path;
     }
 }