<commit_before><?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\widgets\DetailView;
use amilna\blog\models\Category;

/* @var $this yii\web\View */
/* @var $model amilna\blog\models\Post */

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Posts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;

$cat = new Category();
?>
<div class="post-view">

    <h1><?= Html::encode($this->title) ?></h1>    

	<div class="row">
		<!-- Blog Post -->
		<div class="col-sm-8">
			<div>
				<div>
					<h3><?= Html::encode($model->author->username) ?> <small><i class="glyphicon glyphicon-time"></i>  <?= date('D d M, Y',strtotime($model->time)) ?> </small></h3>
				</div>				
				<div>
					<?php
						if ($model->image != null)
						{
							echo Html::img($model->image,["style"=>"width:100%;margin-bottom:20px;","alt"=>$model->title]);					
						}
					?>					
				</div>
				<div>
					<?= $model->content ?>
				</div>				
			</div>
		</div>
		<!-- End Blog Post -->
		<!-- Sidebar -->
		<div class="col-sm-4">
			<?php /*
			<p>
				<?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
				<?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], [
					'class' => 'btn btn-danger',
					'data' => [
						'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
						'method' => 'post',
					],
				]) ?>
			</p>
			*/ ?> <commit_msg>purify content<commit_after><?php

use yii\helpers\Html;
use yii\helpers\HtmlPurifier;
use yii\widgets\ActiveForm;
use yii\widgets\DetailView;
use amilna\blog\models\Category;

/* @var $this yii\web\View */
/* @var $model amilna\blog\models\Post */

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Posts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;

$cat = new Category();
?>
<div class="post-view">

    <h1><?= Html::encode($this->title) ?></h1>    

	<div class="row">
		<!-- Blog Post -->
		<div class="col-sm-8">
			<div>
				<div>
					<h3><?= Html::encode($model->author->username) ?> <small><i class="glyphicon glyphicon-time"></i>  <?= date('D d M, Y',strtotime($model->time)) ?> </small></h3>
				</div>				
				<div>
					<?php
						if ($model->image != null)
						{
							echo Html::img($model->image,["style"=>"width:100%;margin-bottom:20px;","alt"=>$model->title]);					
						}
					?>					
				</div>
				<div>
					<?= HtmlPurifier::process($model->content) ?>
				</div>				
			</div>
		</div>
		<!-- End Blog Post -->
		<!-- Sidebar -->
		<div class="col-sm-4">
			<?php /*
			<p>
				<?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
				<?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], [
					'class' => 'btn btn-danger',
					'data' => [
						'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
						'method' => 'post',
					],
				]) ?>
			</p>
			*/ ?> 
{'fraction_non_alphanumeric': 0.2728768926925609, 'fraction_numerical': 0.007241606319947334, 'mean_word_length': 2.9061696658097684, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5482330', 'n_tokens_mistral': 1414, 'n_tokens_neox': 1168, 'n_words': 211}