From 9f686a115f1a15668940332d876cad306f7625d7 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Mon, 6 Feb 2023 14:28:06 +0100 Subject: [PATCH] [fix] Put a & into a config var --- helpers/utils | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/utils b/helpers/utils index 4cd23da00..04a3d1373 100644 --- a/helpers/utils +++ b/helpers/utils @@ -658,6 +658,7 @@ ynh_write_var_in_file() { endline=${expression_with_comment#"$expression"} endline="$(echo "$endline" | sed 's/\\/\\\\/g')" value="$(echo "$value" | sed 's/\\/\\\\/g')" + value=${value//&/"\&"} local first_char="${expression:0:1}" delimiter=$'\001' if [[ "$first_char" == '"' ]]; then