escape newlines

This commit is contained in:
Linux User 2020-11-07 23:06:26 +00:00
parent ee86d58bf5
commit c033e89f58
1 changed files with 2 additions and 1 deletions

View File

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