Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Blair2004 committed Mar 17, 2021
1 parent 66eb484 commit a7dbdd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions app/Http/Controllers/Dashboard/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ public function crudPost( String $namespace, CrudPostRequest $request )
* sanitizing input to remove
* all script tags
*/
$entry->$name = preg_replace( '#<script(.*?)>(.*?)</script>#is', '', $entry->$name );
if ( ! empty( $entry->$name ) ) {
$entry->$name = preg_replace( '#<script(.*?)>(.*?)</script>#is', null, $entry->$name );
}
}

/**
Expand Down Expand Up @@ -240,7 +242,9 @@ public function crudPut( String $namespace, $id, CrudPutRequest $request )
* sanitizing input to remove
* all script tags
*/
$entry->$name = preg_replace( '#<script(.*?)>(.*?)</script>#is', '', $entry->$name );
if ( ! empty( $entry->$name ) ) {
$entry->$name = preg_replace( '#<script(.*?)>(.*?)</script>#is', null, $entry->$name );
}
}

/**
Expand Down
Empty file modified storage/app/public/index.html
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion tests/Feature/OrderRefundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class OrderRefundTest extends TestCase
*
* @return void
*/
public function testExample()
public function testRefund()
{
Sanctum::actingAs(
Role::namespace( 'admin' )->users->first(),
Expand Down

0 comments on commit a7dbdd7

Please sign in to comment.