mirror of
https://github.com/itflow-org/itflow
synced 2026-07-25 09:47:15 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -7,13 +7,13 @@ $revenue_id = intval($_GET['id']);
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM revenues WHERE revenue_id = $revenue_id LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$revenue_description = nullable_htmlentities($row['revenue_description']);
|
||||
$revenue_reference = nullable_htmlentities($row['revenue_reference']);
|
||||
$revenue_date = nullable_htmlentities($row['revenue_date']);
|
||||
$revenue_payment_method = nullable_htmlentities($row['revenue_payment_method']);
|
||||
$revenue_description = escapeHtml($row['revenue_description']);
|
||||
$revenue_reference = escapeHtml($row['revenue_reference']);
|
||||
$revenue_date = escapeHtml($row['revenue_date']);
|
||||
$revenue_payment_method = escapeHtml($row['revenue_payment_method']);
|
||||
$revenue_amount = floatval($row['revenue_amount']);
|
||||
$revenue_currency_code = nullable_htmlentities($row['revenue_currency_code']);
|
||||
$revenue_created_at = nullable_htmlentities($row['revenue_created_at']);
|
||||
$revenue_currency_code = escapeHtml($row['revenue_currency_code']);
|
||||
$revenue_created_at = escapeHtml($row['revenue_created_at']);
|
||||
$account_id = intval($row['revenue_account_id']);
|
||||
$category_id = intval($row['revenue_category_id']);
|
||||
|
||||
@@ -71,10 +71,10 @@ ob_start();
|
||||
$sql_accounts = mysqli_query($mysqli, "SELECT * FROM accounts WHERE (account_archived_at > '$revenue_created_at' OR account_archived_at IS NULL) ORDER BY account_archived_at ASC, account_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_accounts)) {
|
||||
$account_id_select = intval($row['account_id']);
|
||||
$account_name_select = nullable_htmlentities($row['account_name']);
|
||||
$account_currency_code_select = nullable_htmlentities($row['account_currency_code']);
|
||||
$account_name_select = escapeHtml($row['account_name']);
|
||||
$account_currency_code_select = escapeHtml($row['account_currency_code']);
|
||||
$opening_balance = floatval($row['opening_balance']);
|
||||
$account_archived_at = nullable_htmlentities($row['account_archived_at']);
|
||||
$account_archived_at = escapeHtml($row['account_archived_at']);
|
||||
if (empty($account_archived_at)) {
|
||||
$account_archived_display = "";
|
||||
} else {
|
||||
@@ -117,7 +117,7 @@ ob_start();
|
||||
$sql_category = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Income' AND (category_archived_at > '$revenue_created_at' OR category_archived_at IS NULL) ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_category)) {
|
||||
$category_id_select = intval($row['category_id']);
|
||||
$category_name = nullable_htmlentities($row['category_name']);
|
||||
$category_name = escapeHtml($row['category_name']);
|
||||
?>
|
||||
<option <?php if ($category_id_select == $category_id) { echo "selected"; } ?> value="<?php echo $category_id_select; ?>"><?php echo $category_name; ?></option>
|
||||
|
||||
@@ -155,7 +155,7 @@ ob_start();
|
||||
|
||||
$sql_categories = mysqli_query($mysqli, "SELECT * FROM payment_methods ORDER BY payment_method_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_categories)) {
|
||||
$payment_method_name_select = nullable_htmlentities($row['payment_method_name']);
|
||||
$payment_method_name_select = escapeHtml($row['payment_method_name']);
|
||||
?>
|
||||
<option <?php if ($revenue_payment_method == $payment_method_name_select) { echo "selected"; } ?>><?php echo "$payment_method_name_select"; ?></option>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user