v-list-mail-account-autoreply: JSON export function fix for quotes and backslash

This commit is contained in:
dpeca 2017-12-07 17:23:13 +01:00 committed by GitHub
parent f8be208fa3
commit a8d857f6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,6 +20,8 @@ source $VESTA/func/main.sh
# JSON list function
json_list() {
TO_ESCAPE='\\';
msg=$(echo "$msg" |sed -e "s|${TO_ESCAPE}|${TO_ESCAPE}${TO_ESCAPE}|g" -e 's/"/\\"/g' -e "s/%quote%/'/g")
i='1' # iterator
echo '{'
echo -e "\t\"$account\": {"