mirror of
https://github.com/itflow-org/itflow
synced 2026-07-24 17:30:43 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -7,8 +7,8 @@ $calendar_id = intval($_GET['id']);
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM calendars WHERE calendar_id = $calendar_id LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$calendar_name = nullable_htmlentities($row['calendar_name']);
|
||||
$calendar_color = nullable_htmlentities($row['calendar_color']);
|
||||
$calendar_name = escapeHtml($row['calendar_name']);
|
||||
$calendar_color = escapeHtml($row['calendar_color']);
|
||||
|
||||
// Generate the HTML form content using output buffering.
|
||||
ob_start();
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM calendars ORDER BY calendar_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$calendar_id = intval($row['calendar_id']);
|
||||
$calendar_name = nullable_htmlentities($row['calendar_name']);
|
||||
$calendar_color = nullable_htmlentities($row['calendar_color']);
|
||||
$calendar_name = escapeHtml($row['calendar_name']);
|
||||
$calendar_color = escapeHtml($row['calendar_color']);
|
||||
?>
|
||||
<option <?php if ($config_default_calendar == $calendar_id) { echo "selected"; } ?> data-content="<i class='fa fa-circle mr-2' style='color:<?php echo $calendar_color; ?>;'></i> <?php echo $calendar_name; ?>" value="<?php echo $calendar_id; ?>"><?php echo $calendar_name; ?></option>
|
||||
<?php } ?>
|
||||
@@ -136,8 +136,8 @@
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id AND contact_primary = 1 ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
$contact_email = nullable_htmlentities($row['contact_email']);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
$contact_email = escapeHtml($row['contact_email']);
|
||||
?>
|
||||
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ $event_id = intval($_GET['id']);
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM calendar_events LEFT JOIN calendars ON event_calendar_id = calendar_id WHERE event_id = $event_id LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$event_title = nullable_htmlentities($row['event_title']);
|
||||
$event_description = nullable_htmlentities($row['event_description']);
|
||||
$event_location = nullable_htmlentities($row['event_location']);
|
||||
$event_start = nullable_htmlentities($row['event_start']);
|
||||
$event_end = nullable_htmlentities($row['event_end']);
|
||||
$event_repeat = nullable_htmlentities($row['event_repeat']);
|
||||
$event_title = escapeHtml($row['event_title']);
|
||||
$event_description = escapeHtml($row['event_description']);
|
||||
$event_location = escapeHtml($row['event_location']);
|
||||
$event_start = escapeHtml($row['event_start']);
|
||||
$event_end = escapeHtml($row['event_end']);
|
||||
$event_repeat = escapeHtml($row['event_repeat']);
|
||||
$calendar_id = intval($row['calendar_id']);
|
||||
$calendar_name = nullable_htmlentities($row['calendar_name']);
|
||||
$calendar_color = nullable_htmlentities($row['calendar_color']);
|
||||
$calendar_name = escapeHtml($row['calendar_name']);
|
||||
$calendar_color = escapeHtml($row['calendar_color']);
|
||||
$client_id = intval($row['event_client_id']);
|
||||
|
||||
// Generate the HTML form content using output buffering.
|
||||
@@ -64,8 +64,8 @@ ob_start();
|
||||
$sql_calendars_select = mysqli_query($mysqli, "SELECT * FROM calendars ORDER BY calendar_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_calendars_select)) {
|
||||
$calendar_id_select = intval($row['calendar_id']);
|
||||
$calendar_name_select = nullable_htmlentities($row['calendar_name']);
|
||||
$calendar_color_select = nullable_htmlentities($row['calendar_color']);
|
||||
$calendar_name_select = escapeHtml($row['calendar_name']);
|
||||
$calendar_color_select = escapeHtml($row['calendar_color']);
|
||||
?>
|
||||
<option data-content="<i class='fa fa-circle mr-2' style='color:<?php echo $calendar_color_select; ?>;'></i> <?php echo $calendar_name_select; ?>"<?php if ($calendar_id == $calendar_id_select) { echo "selected"; } ?> value="<?php echo $calendar_id_select; ?>"><?php echo $calendar_name_select; ?></option>
|
||||
|
||||
@@ -159,8 +159,8 @@ ob_start();
|
||||
$sql_clients = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id AND contact_primary = 1 ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_clients)) {
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name_select = nullable_htmlentities($row['client_name']);
|
||||
$contact_email_select = nullable_htmlentities($row['contact_email']);
|
||||
$client_name_select = escapeHtml($row['client_name']);
|
||||
$contact_email_select = escapeHtml($row['contact_email']);
|
||||
?>
|
||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user