diff --git a/add_todo.sh b/add_todo.sh index bab430d..317a553 100755 --- a/add_todo.sh +++ b/add_todo.sh @@ -12,7 +12,8 @@ if [ -z "$_api_auth" ] ; then fi _title="$1" -_description="$2" +# remove newlines (https://stackoverflow.com/a/38672741/1885932) +_description="$(echo "$2" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')" _api_url='http://kanboard.docker.home/jsonrpc.php' _project_id=4