Код: Выделить всё
[
'attribute' => 'content',
'format' => 'html',
],
Код: Выделить всё
\yii\helpers\StringHelper::truncate(Yii::$app->request->get('cont_qu'),50,'...')
Код: Выделить всё
<h1><?= Html::encode($this->title) ?></h1>
Код: Выделить всё
<?php
/**
* Created by PhpStorm.
* User: svetlanailina
* Date: 26.03.18
* Time: 21:40
*/
use yii\helpers\HTMLPurifier;
function debug($arr){
echo '<pre>'.print_r($arr, true).'</pre>';
}
function purifier($text)
{
$pr = new HtmlPurifier;
return $pr->process($text);
}
....
purifier($text);