From fa9531554248761cdae1043c8a22330889a11394 Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Tue, 9 Apr 2024 22:36:27 +0200 Subject: [PATCH] fix: special chars in subscriptions --- endpoints/subscription/get.php | 2 +- endpoints/subscriptions/get.php | 2 +- includes/inputvalidation.php | 1 - includes/version.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/endpoints/subscription/get.php b/endpoints/subscription/get.php index 7063cff60..ef0914968 100644 --- a/endpoints/subscription/get.php +++ b/endpoints/subscription/get.php @@ -13,7 +13,7 @@ if ($row = $result->fetchArray(SQLITE3_ASSOC)) { $subscriptionData['id'] = $subscriptionId; - $subscriptionData['name'] = $row['name']; + $subscriptionData['name'] = htmlspecialchars_decode($row['name']); $subscriptionData['logo'] = $row['logo']; $subscriptionData['price'] = $row['price']; $subscriptionData['currency_id'] = $row['currency_id']; diff --git a/endpoints/subscriptions/get.php b/endpoints/subscriptions/get.php index 4e3f5eb48..97704f81c 100644 --- a/endpoints/subscriptions/get.php +++ b/endpoints/subscriptions/get.php @@ -68,7 +68,7 @@ $id = $subscription['id']; $print[$id]['id'] = $id; $print[$id]['logo'] = $subscription['logo'] != "" ? "images/uploads/logos/".$subscription['logo'] : $defaultLogo; - $print[$id]['name']= $subscription['name']; + $print[$id]['name'] = htmlspecialchars_decode($subscription['name']); $cycle = $subscription['cycle']; $frequency = $subscription['frequency']; $print[$id]['billing_cycle'] = getBillingCycle($cycle, $frequency, $i18n); diff --git a/includes/inputvalidation.php b/includes/inputvalidation.php index 3725ac6b5..f3d8d0100 100644 --- a/includes/inputvalidation.php +++ b/includes/inputvalidation.php @@ -4,7 +4,6 @@ function validate($value) { $value = trim($value); $value = stripslashes($value); $value = htmlspecialchars($value); - $value = htmlentities($value); return $value; } diff --git a/includes/version.php b/includes/version.php index d20b61e2e..24ecc9b03 100644 --- a/includes/version.php +++ b/includes/version.php @@ -1,3 +1,3 @@