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