Skip to content

Commit

Permalink
better escape
Browse files Browse the repository at this point in the history
  • Loading branch information
hermawanramadhan committed May 25, 2022
1 parent 2f35485 commit b3ffc89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DataTableQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public function getDataResult()

foreach ($queryResult as $row)
{
//escaping all
foreach($row as $key => $val)
$row->$key = esc($val);

$data = [];
$columns = $this->columnDefs->getColumns();

Expand All @@ -98,7 +102,7 @@ public function getDataResult()
break;

default:
$value = esc($row->{$column->alias}); // Escape all other data if not used in formatting types
$value = $row->{$column->alias};
break;
}

Expand Down

0 comments on commit b3ffc89

Please sign in to comment.