class NoticeSection extends Section
{
+ protected $maxchars = 140;
+
function showContent()
{
$notices = $this->getNotices();
$this->out->elementEnd('span');
$this->out->elementStart('p', 'entry-content');
- $this->out->raw($notice->rendered);
+ $this->out->text(mb_strlen($notice->content) > $this->maxchars
+ ? mb_substr($notice->content, 0, $this->maxchars) . '…'
+ : $notice->content);
$this->out->elementEnd('p');
$this->out->elementStart('div', 'entry_content');