public function beforeSave($insert) { if ($this->type == Block::TYPE_PLAIN) { $this->content = strip_tags($this->content, '<br><br/><b><i><u><a><strong><em>'); } return parent::beforeSave($insert); }