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
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $casting = array(
|
private static $casting = array(
|
||||||
'Excerpt' => 'Text',
|
'Excerpt' => 'HTMLText',
|
||||||
'Date' => 'SS_Datetime',
|
'Date' => 'SS_Datetime',
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -549,9 +549,7 @@ class BlogPost extends Page
|
|||||||
*/
|
*/
|
||||||
public function Excerpt($wordsToDisplay = 30)
|
public function Excerpt($wordsToDisplay = 30)
|
||||||
{
|
{
|
||||||
/**
|
/** @var HTMLText $content */
|
||||||
* @var Text $content
|
|
||||||
*/
|
|
||||||
$content = $this->dbObject('Content');
|
$content = $this->dbObject('Content');
|
||||||
|
|
||||||
return $content->Summary($wordsToDisplay);
|
return $content->Summary($wordsToDisplay);
|
||||||
|
Loading…
Reference in New Issue
Block a user