mirror of
https://github.com/itflow-org/itflow
synced 2026-07-23 17:00:40 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -109,7 +109,7 @@ ob_start();
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_assoc($referral_sql)) {
|
||||
$referral = nullable_htmlentities($row['category_name']); ?>
|
||||
$referral = escapeHtml($row['category_name']); ?>
|
||||
<option><?php echo $referral; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
@@ -144,7 +144,7 @@ ob_start();
|
||||
|
||||
while ($row = mysqli_fetch_assoc($sql_tags_select)) {
|
||||
$tag_id_select = intval($row['tag_id']);
|
||||
$tag_name_select = nullable_htmlentities($row['tag_name']);
|
||||
$tag_name_select = escapeHtml($row['tag_name']);
|
||||
?>
|
||||
<option value="<?php echo $tag_id_select; ?>"><?php echo $tag_name_select; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
@@ -64,7 +64,7 @@ ob_start();
|
||||
$sql_categories = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Ticket' AND category_archived_at IS NULL");
|
||||
while ($row = mysqli_fetch_assoc($sql_categories)) {
|
||||
$category_id = intval($row['category_id']);
|
||||
$category_name = nullable_htmlentities($row['category_name']);
|
||||
$category_name = escapeHtml($row['category_name']);
|
||||
|
||||
?>
|
||||
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
||||
@@ -97,7 +97,7 @@ ob_start();
|
||||
);
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$user_id = intval($row['user_id']);
|
||||
$user_name = nullable_htmlentities($row['user_name']); ?>
|
||||
$user_name = escapeHtml($row['user_name']); ?>
|
||||
<option value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
@@ -120,7 +120,7 @@ ob_start();
|
||||
$sql_projects = mysqli_query($mysqli, "SELECT * FROM projects WHERE project_completed_at IS NULL AND project_archived_at IS NULL ORDER BY project_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_projects)) {
|
||||
$project_id_select = intval($row['project_id']);
|
||||
$project_name_select = nullable_htmlentities($row['project_name']); ?>
|
||||
$project_name_select = escapeHtml($row['project_name']); ?>
|
||||
<option value="<?php echo $project_id_select; ?>"><?php echo $project_name_select; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
@@ -41,7 +41,7 @@ ob_start();
|
||||
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 1 ORDER BY tag_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_tags_select)) {
|
||||
$tag_id_select = intval($row['tag_id']);
|
||||
$tag_name_select = nullable_htmlentities($row['tag_name']);
|
||||
$tag_name_select = escapeHtml($row['tag_name']);
|
||||
?>
|
||||
<option value="<?php echo $tag_id_select; ?>"><?php echo $tag_name_select; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
@@ -33,7 +33,7 @@ ob_start();
|
||||
<?php
|
||||
$referral_sql = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Referral' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($referral_sql)) {
|
||||
$referral = nullable_htmlentities($row['category_name']); ?>
|
||||
$referral = escapeHtml($row['category_name']); ?>
|
||||
<option><?php echo $referral; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@@ -28,20 +28,20 @@ ob_start();
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<select type="text" class="form-control select2" name="mail_from">
|
||||
<option value="<?php echo nullable_htmlentities($config_mail_from_email); ?>">
|
||||
<?php echo nullable_htmlentities("$config_mail_from_name - $config_mail_from_email"); ?></option>
|
||||
<option value="<?php echo nullable_htmlentities($config_invoice_from_email); ?>">
|
||||
<?php echo nullable_htmlentities("$config_invoice_from_name - $config_invoice_from_email"); ?></option>
|
||||
<option value="<?php echo nullable_htmlentities($config_quote_from_email); ?>">
|
||||
<?php echo nullable_htmlentities("$config_quote_from_name - $config_quote_from_email"); ?></option>
|
||||
<option value="<?php echo nullable_htmlentities($config_ticket_from_email); ?>">
|
||||
<?php echo nullable_htmlentities("$config_ticket_from_name - $config_ticket_from_email"); ?></option>
|
||||
<option value="<?php echo escapeHtml($config_mail_from_email); ?>">
|
||||
<?php echo escapeHtml("$config_mail_from_name - $config_mail_from_email"); ?></option>
|
||||
<option value="<?php echo escapeHtml($config_invoice_from_email); ?>">
|
||||
<?php echo escapeHtml("$config_invoice_from_name - $config_invoice_from_email"); ?></option>
|
||||
<option value="<?php echo escapeHtml($config_quote_from_email); ?>">
|
||||
<?php echo escapeHtml("$config_quote_from_name - $config_quote_from_email"); ?></option>
|
||||
<option value="<?php echo escapeHtml($config_ticket_from_email); ?>">
|
||||
<?php echo escapeHtml("$config_ticket_from_name - $config_ticket_from_email"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name" maxlength="255"
|
||||
value="<?php echo nullable_htmlentities($config_mail_from_name); ?>">
|
||||
value="<?php echo escapeHtml($config_mail_from_name); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
?>
|
||||
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@ $client_id = intval($_GET['id']);
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = $client_id $access_permission_query LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
$client_is_lead = intval($row['client_lead']);
|
||||
$client_type = nullable_htmlentities($row['client_type']);
|
||||
$client_website = nullable_htmlentities($row['client_website']);
|
||||
$client_referral = nullable_htmlentities($row['client_referral']);
|
||||
$client_type = escapeHtml($row['client_type']);
|
||||
$client_website = escapeHtml($row['client_website']);
|
||||
$client_referral = escapeHtml($row['client_referral']);
|
||||
$client_net_terms = intval($row['client_net_terms']);
|
||||
$client_tax_id_number = nullable_htmlentities($row['client_tax_id_number']);
|
||||
$client_abbreviation = nullable_htmlentities($row['client_abbreviation']);
|
||||
$client_tax_id_number = escapeHtml($row['client_tax_id_number']);
|
||||
$client_abbreviation = escapeHtml($row['client_abbreviation']);
|
||||
$client_rate = floatval($row['client_rate']);
|
||||
$client_notes = nullable_htmlentities($row['client_notes']);
|
||||
$client_created_at = nullable_htmlentities($row['client_created_at']);
|
||||
$client_archived_at = nullable_htmlentities($row['client_archived_at']);
|
||||
$client_notes = escapeHtml($row['client_notes']);
|
||||
$client_created_at = escapeHtml($row['client_created_at']);
|
||||
$client_archived_at = escapeHtml($row['client_archived_at']);
|
||||
|
||||
// Client Tags
|
||||
$client_tag_id_array = array();
|
||||
@@ -123,7 +123,7 @@ ob_start();
|
||||
|
||||
$referral_sql = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Referral' AND (category_archived_at > '$client_created_at' OR category_archived_at IS NULL) ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($referral_sql)) {
|
||||
$referral = nullable_htmlentities($row['category_name']);
|
||||
$referral = escapeHtml($row['category_name']);
|
||||
?>
|
||||
<option <?php if ($client_referral == $referral) {
|
||||
echo "selected";
|
||||
@@ -167,7 +167,7 @@ ob_start();
|
||||
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 1 ORDER BY tag_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_tags_select)) {
|
||||
$tag_id_select = intval($row['tag_id']);
|
||||
$tag_name_select = nullable_htmlentities($row['tag_name']);
|
||||
$tag_name_select = escapeHtml($row['tag_name']);
|
||||
?>
|
||||
<option value="<?php echo $tag_id_select; ?>" <?php if (in_array($tag_id_select, $client_tag_id_array)) { echo "selected"; } ?>><?php echo $tag_name_select; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user