Skip to content

Commit

Permalink
fi bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tongxuebb committed Nov 30, 2019
1 parent 4a9d685 commit 79fdb42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion views/news/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use yii\bootstrap\Html;
use app\widgets\LastNews;
use app\widgets\ConfigPanel;
use yii\helpers\HtmlPurifier;

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label'=>'新闻', 'url'=>['/news/list']];
Expand All @@ -26,7 +27,7 @@
<small><?=date('Y-m-d H:i:s',$model->updated_at)?> <span class="glyphicon glyphicon-eye-open"><?=$model->hits?></span></small>
</div>
<div class="panel-body">
<?= Html::encode($model->detail->detail, false)?>
<?= HtmlPurifier::process($model->detail->detail, false)?>
</div>
<div class="panel-body">
<div class="row">
Expand Down
5 changes: 3 additions & 2 deletions views/products/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use yii\bootstrap\Html;
use app\widgets\LastNews;
use app\widgets\ConfigPanel;
use yii\helpers\HtmlPurifier;

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label'=>'产品', 'url'=>['/products/list']];
Expand Down Expand Up @@ -60,7 +61,7 @@
<h4><?=$model->title?></h4>
<div>
<div>
<?=$model->detail->params?>
<?=HtmlPurifier::process($model->detail->params)?>
</div>
<div style="margin-top: 15px">
在线咨询:
Expand All @@ -77,7 +78,7 @@
</div>

<div class="panel-body">
<?=Html::encode($model->detail->detail)?>
<?=HtmlPurifier::process($model->detail->detail)?>
</div>
<div class="panel-body">
<div class="row">
Expand Down
3 changes: 2 additions & 1 deletion views/site/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/* @var $adList array */
use app\widgets\LastNews;
use app\widgets\ConfigPanel;
use yii\helpers\HtmlPurifier;
use yii\widgets\ListView;
use yii\bootstrap\Carousel;
use yii\helpers\Url;
Expand Down Expand Up @@ -58,7 +59,7 @@
</a>
</h5>
<div style="height: 40px;overflow: hidden;">
<?= $model->description ?>
<?= HtmlPurifier::process($model->description) ?>
</div>
</div>
</div>
Expand Down

0 comments on commit 79fdb42

Please sign in to comment.