diff --git a/bin/out b/bin/out index ff6b96e..ee31d3c 100755 --- a/bin/out +++ b/bin/out @@ -60,7 +60,7 @@ if [[ "$always_notify" == "true" || -n "$TEXT_FILE_CONTENT" || -z "$text_file" | then export TEXT_FILE_CONTENT="${TEXT_FILE_CONTENT:-_(text_file not provided)_}" - text=$(echo -n "${text}" | envsubst) + text=$(echo -en "${text}" | envsubst) [[ -z "${text}" ]] && text="_(missing notification text)_" [ "${link}" == "true" ] && formatted_body="${text}" @@ -71,10 +71,10 @@ then fi text=$(echo -n "${text}" | jq -R -s .) - [ -n "${formatted_body}" ] && formatted_body="$(echo -n "${formatted_body}" | jq -R -s .)" + [ -n "${formatted_body}" ] && formatted_body=$(echo -n "${formatted_body}" | jq -R -s .) - [[ "${token}" != "null" ]] && username="$(echo "$token" | envsubst | jq -R -s .)" - [[ "${room_id}" != "null" ]] && room_id="$(echo "$room_id" | envsubst | jq -R -s .)" + [[ "${token}" != "null" ]] && username=$(echo "$token" | envsubst | jq -R -s .) + [[ "${room_id}" != "null" ]] && room_id=$(echo "$room_id" | envsubst | jq -R -s .) body="$(cat <