From d7dfc9a643fa662ff7fddafbaf3a8d864920ca86 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Dec 2023 23:16:13 +0100 Subject: [PATCH] Escape spaces in wiki name during install --- scripts/install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 327d570..87162a5 100755 --- a/scripts/install +++ b/scripts/install @@ -49,7 +49,9 @@ ynh_script_progression --message="Finalizing installation..." --weight=2 admin_temp_pass=$(ynh_string_random 20) -ynh_local_curl "/?PagePrincipale&installAction=install" "config[default_language]=$language" "config[wakka_name]=$wiki_name" \ +wiki_name_escaped=$(echo "$wiki_name" | sed 's/ /%20/g') + +ynh_local_curl "/?PagePrincipale&installAction=install" "config[default_language]=$language" "config[wakka_name]=$wiki_name_escaped" \ "config[root_page]=PagePrincipale" "config[mysql_host]=localhost" \ "config[mysql_database]=$app" "config[mysql_user]=$db_user" "config[mysql_password]=$db_pwd" "config[table_prefix]=yeswiki_" \ "admin_name=$admin" "admin_password=$admin_temp_pass" "admin_password_conf=$admin_temp_pass" \