Skip to content

Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.

Fix: encoding for url and notes (#273)

Miguel Ribeiroad86eb5b9c6e
diff --git a/endpoints/subscription/get.php b/endpoints/subscription/get.php
index ef09149..7e8f680 100644
--- a/endpoints/subscription/get.php
+++ b/endpoints/subscription/get.php
@@ -20,13 +20,13 @@
$subscriptionData['next_payment'] = $row['next_payment'];
$subscriptionData['frequency'] = $row['frequency'];
$subscriptionData['cycle'] = $row['cycle'];
- $subscriptionData['notes'] = $row['notes'];
+ $subscriptionData['notes'] = htmlspecialchars_decode($row['notes']);
$subscriptionData['payment_method_id'] = $row['payment_method_id'];
$subscriptionData['payer_user_id'] = $row['payer_user_id'];
$subscriptionData['category_id'] = $row['category_id'];
$subscriptionData['notify'] = $row['notify'];
$subscriptionData['inactive'] = $row['inactive'];
- $subscriptionData['url'] = $row['url'];
+ $subscriptionData['url'] = htmlspecialchars_decode($row['url']);
$subscriptionJson = json_encode($subscriptionData);
header('Content-Type: application/json');
diff --git a/endpoints/subscriptions/get.php b/endpoints/subscriptions/get.php
index 97704f8..8cc8940 100644
--- a/endpoints/subscriptions/get.php
+++ b/endpoints/subscriptions/get.php
@@ -84,8 +84,8 @@
$print[$id]['payer_user_id'] = $subscription['payer_user_id'];
$print[$id]['price'] = floatval($subscription['price']);
$print[$id]['inactive'] = $subscription['inactive'];
- $print[$id]['url'] = $subscription['url'];
- $print[$id]['notes'] = $subscription['notes'];
+ $print[$id]['url'] = htmlspecialchars_decode($subscription['url']);
+ $print[$id]['notes'] = htmlspecialchars_decode($subscription['notes']);
if (isset($settings['convertCurrency']) && $settings['convertCurrency'] === 'true' && $currencyId != $mainCurrencyId) {
$print[$id]['price'] = getPriceConverted($print[$id]['price'], $currencyId, $db);
diff --git a/includes/version.php b/includes/version.php
index 24ecc9b..1196d01 100644
--- a/includes/version.php
+++ b/includes/version.php
@@ -1,3 +1,3 @@
<?php
- $version = "v1.20.1";
+ $version = "v1.20.2";
?>