]> BookStack Code Mirror - bookstack/commitdiff
Fixed page listing excerpts not showing due to encoding issues
authorDan Brown <redacted>
Sun, 21 Feb 2016 13:15:46 +0000 (13:15 +0000)
committerDan Brown <redacted>
Sun, 21 Feb 2016 13:15:46 +0000 (13:15 +0000)
app/Page.php

index bd5f3bafe33eb0b3c3cf295a8502d5b750a9f1b6..53724ec20d5921fcea668f3abaa54ef3440daa5e 100644 (file)
@@ -45,7 +45,8 @@ class Page extends Entity
 
     public function getExcerpt($length = 100)
     {
-        return strlen($this->text) > $length ? substr($this->text, 0, $length-3) . '...' : $this->text;
+        $text = strlen($this->text) > $length ? substr($this->text, 0, $length-3) . '...' : $this->text;
+        return mb_convert_encoding($text, 'UTF-8');
     }
 
 }