Remove invalid characters from welcome

This commit is contained in:
Bob Mottram 2016-10-17 17:54:22 +01:00
parent ffc3ea2cda
commit ec8e1e850c
1 changed files with 7 additions and 0 deletions

View File

@ -165,6 +165,13 @@ function install_interactive_gnusocial {
GNUSOCIAL_DETAILS_COMPLETE="yes"
fi
done
# remove any invalid characters
if [ ${#GNUSOCIAL_WELCOME_MESSAGE} -gt 0 ]; then
new_welcome=$(echo "$GNUSOCIAL_WELCOME_MESSAGE" | sed "s|'||g")
GNUSOCIAL_WELCOME_MESSAGE="$new_welcome"
fi
# save the results in the config file
write_config_param "GNUSOCIAL_CODE" "$GNUSOCIAL_CODE"
write_config_param "GNUSOCIAL_WELCOME_MESSAGE" "$GNUSOCIAL_WELCOME_MESSAGE"