Skip to content

Commit 8efbfca

Browse files
committed
modules: jsonDB: delete backticks in Json2Array input
1 parent d6f37af commit 8efbfca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/jsonDB.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This file is public domain in the USA and all free countries.
66
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
77
#
8-
#### $$VERSION$$ v1.40-0-gf9dab50
8+
#### $$VERSION$$ v1.45-dev-29-gd6f37af
99
#
1010
# source from commands.sh to use jsonDB functions
1111
#
@@ -353,9 +353,10 @@ function jssh_updateArray_async() {
353353
# read JSON.sh style data and asssign to an ARRAY
354354
# $1 ARRAY name, must be declared with "declare -A ARRAY" before calling
355355
Json2Array() {
356-
# match ["....."]\t and replace \t with = and print quote true false escape not escaped $
356+
# match ["....."]\t and replace \t with = and print delete ` quote true false escape not escaped $
357357
# shellcheck disable=SC1091,SC1090
358-
[ -z "$1" ] || source <( printf "$1"'=( %s )' "$(sed -E -n -e '/\["[-0-9a-zA-Z_,."]+"\]\+*\t/ s/\t/=/p' -e 's/=(true|false)/="\1"/' -e 's/([^\]|^)\$/\1\\$/g')" )
358+
[ -z "$1" ] || source <( printf "$1"'=( %s )'\
359+
"$(sed -E -n -e '/\["[-0-9a-zA-Z_,."]+"\]\+*\t/ s/\t/=/p' -e 's/`//g' -e 's/=(true|false)/="\1"/' -e 's/([^\]|^)\$/\1\\$/g')" )
359360
}
360361
# get Config Key from jssh file without jsshDB
361362
# output ARRAY as JSON.sh style data

0 commit comments

Comments
 (0)