public function setTextAttribute($text) { $text = str_replace(' ', ' ', $text); if ($this->slotname === 'standfirst') { $siteText = $text = strip_tags($text); } else { $text = Str::makeInternalLinksRelative($text); $siteText = Str::StorifyEmbed(Str::OEmbed($text)); } $this->attributes['text'] = $text; $this->attributes['site_text'] = $siteText; }