mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX Excerpt should be casted as HTMLText
This commit is contained in:
parent
0f77789eb5
commit
ffab2df9d2
@ -83,7 +83,7 @@ class BlogPost extends Page
|
||||
* @var array
|
||||
*/
|
||||
private static $casting = array(
|
||||
'Excerpt' => 'Text',
|
||||
'Excerpt' => 'HTMLText',
|
||||
'Date' => 'SS_Datetime',
|
||||
);
|
||||
|
||||
@ -549,9 +549,7 @@ class BlogPost extends Page
|
||||
*/
|
||||
public function Excerpt($wordsToDisplay = 30)
|
||||
{
|
||||
/**
|
||||
* @var Text $content
|
||||
*/
|
||||
/** @var HTMLText $content */
|
||||
$content = $this->dbObject('Content');
|
||||
|
||||
return $content->Summary($wordsToDisplay);
|
||||
|
Loading…
Reference in New Issue
Block a user