Fixing XSS vulnerability by using the proper output tags

This commit is contained in:
Nabeel Shahzad
2018-03-12 17:58:12 -05:00
parent 17f9464208
commit 8076c2d8c1
165 changed files with 1187 additions and 1187 deletions

View File

@@ -8,27 +8,27 @@
@foreach($news as $item)
<div class="content">
<div class="header">
<h4 class="title">{!! $item->subject !!}</h4>
<p class="category">{!! $item->user->name !!} - {!! show_datetime($item->created_at) !!}</p>
<h4 class="title">{{ $item->subject }}</h4>
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p>
</div>
{!! $item->body !!}
{{ $item->body }}
<div class="text-right">
{!! Form::open(['route' => 'admin.dashboard.news',
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'delete',
'class' => 'pjax_news_form',
]) !!}
{!! Form::hidden('news_id', $item->id) !!}
{!!
]) }}
{{ Form::hidden('news_id', $item->id) }}
{{
Form::button('<i class="far fa-trash-alt"></i>&nbsp;delete',
['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
!!}
{!! Form::close() !!}
}}
{{ Form::close() }}
</div>
</div>
<hr />
@@ -37,29 +37,29 @@
<div class="header">
<h4 class="title">Add News</h4>
</div>
{!! Form::open(['route' => 'admin.dashboard.news',
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'post',
'class' => 'pjax_news_form',
]) !!}
]) }}
<table class="table">
<tr>
<td>{!! Form::label('subject', 'Subject:') !!}</td>
<td>{!! Form::text('subject', '', ['class' => 'form-control']) !!}</td>
<td>{{ Form::label('subject', 'Subject:') }}</td>
<td>{{ Form::text('subject', '', ['class' => 'form-control']) }}</td>
</tr>
<tr>
<td>{!! Form::label('body', 'Body:') !!}</td>
<td>{!! Form::textarea('body', '', ['class' => 'form-control']) !!}</td>
<td>{{ Form::label('body', 'Body:') }}</td>
<td>{{ Form::textarea('body', '', ['class' => 'form-control']) }}</td>
</tr>
</table>
<div class="text-right">
{!!
{{
Form::button('<i class="fas fa-plus-circle"></i>&nbsp;add',
['type' => 'submit',
'class' => 'btn btn-success btn-s'])
!!}
{!! Form::close() !!}
}}
{{ Form::close() }}
</div>
</div>
</div>