From 582b4171ea7865404115b08d741e0cc8d361d0e5 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 20 Jan 2021 19:35:35 +0300 Subject: [PATCH] Do not loose empty space from params --- bashlib.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bashlib.in b/bashlib.in index 39fddc0..b0c0ed0 100644 --- a/bashlib.in +++ b/bashlib.in @@ -186,7 +186,9 @@ param() { else value=$(@ENV@ | @GREP@ '^FORM_' | @SED@ -e 's/FORM_//' | @CUT@ -d= -f1) fi - echo ${value} + # "+" is URL-encoded as "%2B", web server replaces spaces with "+", replace back, + # otherwise safe_param() just removes the "+" sign and looses the space. + echo "${value}" | @SED@ -e 's/+/ /' unset name unset value }