<?= $form->field($model, 'LastName')->textInput()
strip_tags() не помогает
<?php $model->LastName = strip_tags($model->LastName); ?>
<?= $form->field($model, 'LastName')->textInput(); ?>
public function beforeSave($insert)
{
if (parent::beforeSave($insert)) {
$this->text = self::purifier($this->text);
return true;
} else {
return false;
}
}
public static function purifier($text)
{
$pr = new HtmlPurifier;
return $pr->process($text);
}