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.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-03-05 16:25:46 +00:00 committed by Katrin Fischer
parent f6ec375be2
commit 13cb1a78ef
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 1 additions and 1 deletions

View File

@ -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)
)