Merge pull request #1590 from YunoHost/fix-and-ynh-write-var

[fix] Put a & into a config var
This commit is contained in:
Alexandre Aubin 2023-02-06 14:33:09 +01:00 committed by GitHub
commit 387f57d630
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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