Fixed page listing excerpts not showing due to encoding issues

This commit is contained in:
Dan Brown 2016-02-21 13:15:46 +00:00
parent 61577cf6bf
commit 6bd49bcd4b

View 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');
}
}