mirror of
https://github.com/itflow-org/itflow
synced 2026-07-23 08:50:42 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -59,7 +59,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search Trips">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(escapeHtml($q)); } ?>" placeholder="Search Trips">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#advancedFilter"><i class="fas fa-filter"></i></button>
|
||||
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
||||
@@ -77,9 +77,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<div class="form-group">
|
||||
<label>Date range</label>
|
||||
<input type="text" id="dateFilter" class="form-control" autocomplete="off">
|
||||
<input type="hidden" name="canned_date" id="canned_date" value="<?php echo nullable_htmlentities($_GET['canned_date']) ?? ''; ?>">
|
||||
<input type="hidden" name="dtf" id="dtf" value="<?php echo nullable_htmlentities($dtf ?? ''); ?>">
|
||||
<input type="hidden" name="dtt" id="dtt" value="<?php echo nullable_htmlentities($dtt ?? ''); ?>">
|
||||
<input type="hidden" name="canned_date" id="canned_date" value="<?php echo escapeHtml($_GET['canned_date']) ?? ''; ?>">
|
||||
<input type="hidden" name="dtf" id="dtf" value="<?php echo escapeHtml($dtf ?? ''); ?>">
|
||||
<input type="hidden" name="dtt" id="dtt" value="<?php echo escapeHtml($dtt ?? ''); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -135,17 +135,17 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$trip_id = intval($row['trip_id']);
|
||||
$trip_date = nullable_htmlentities($row['trip_date']);
|
||||
$trip_purpose = nullable_htmlentities($row['trip_purpose']);
|
||||
$trip_source = nullable_htmlentities($row['trip_source']);
|
||||
$trip_destination = nullable_htmlentities($row['trip_destination']);
|
||||
$trip_date = escapeHtml($row['trip_date']);
|
||||
$trip_purpose = escapeHtml($row['trip_purpose']);
|
||||
$trip_source = escapeHtml($row['trip_source']);
|
||||
$trip_destination = escapeHtml($row['trip_destination']);
|
||||
$trip_miles = number_format(floatval($row['trip_miles']),1);
|
||||
$trip_user_id = intval($row['trip_user_id']);
|
||||
$trip_created_at = nullable_htmlentities($row['trip_created_at']);
|
||||
$trip_archived_at = nullable_htmlentities($row['trip_archived_at']);
|
||||
$round_trip = nullable_htmlentities($row['round_trip']);
|
||||
$trip_created_at = escapeHtml($row['trip_created_at']);
|
||||
$trip_archived_at = escapeHtml($row['trip_archived_at']);
|
||||
$round_trip = escapeHtml($row['round_trip']);
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
if (empty($client_name)) {
|
||||
$client_name_display = "-";
|
||||
} else {
|
||||
@@ -156,7 +156,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
} else {
|
||||
$round_trip_display = "";
|
||||
}
|
||||
$user_name = nullable_htmlentities($row['user_name']);
|
||||
$user_name = escapeHtml($row['user_name']);
|
||||
if (empty($user_name)) {
|
||||
$user_name_display = "-";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user