From 34b182cb32b937a0faf7a002f99ae0e96159a940 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 5 Mar 2024 16:25:46 +0000 Subject: [PATCH] Bug 36235: Encode system preference data with encodeURIComponent To test: 1. Add some data to a freetext system preference like IntranetUserJS or AdditionalFieldsInZ3950ResultAuthSearch that includes a semicolon; 2. Save the pref and reload the page or check the DB. Everything after the semicolon is removed. 3. Apply patch, try again. Data should remain as is. --- .../prog/js/fetch/system-preferences-api-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js index 1b8634951b..e2b9bcbac8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js +++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js @@ -32,7 +32,7 @@ export class SysprefAPIClient extends HttpClient { .map(variable => sysprefs[variable].length ? sysprefs[variable].map(value => - "%s=%s".format(variable, value) + "%s=%s".format(variable, encodeURIComponent(value)) ) : "%s=".format(variable) ) -- 2.30.2