From a8d857f6d5e3424b73958fc7d7e35bf90ae87a15 Mon Sep 17 00:00:00 2001 From: dpeca Date: Thu, 7 Dec 2017 17:23:13 +0100 Subject: [PATCH] v-list-mail-account-autoreply: JSON export function fix for quotes and backslash --- bin/v-list-mail-account-autoreply | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/v-list-mail-account-autoreply b/bin/v-list-mail-account-autoreply index 257d873d..4d5b17ca 100755 --- a/bin/v-list-mail-account-autoreply +++ b/bin/v-list-mail-account-autoreply @@ -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\": {"