Skip to content

Commit

Permalink
Fix escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Feb 29, 2024
1 parent f78c213 commit bd3cebf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/update_asana_for_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ construct_this_release_includes() {
printf '%s' '<ul>'
for task_id in "${task_ids[@]}"; do
if [[ "$task_id" != "$release_task_id" ]]; then
printf '%s' "<li><a data-asana-gid=\\\"${task_id}\\\"/></li>"
printf '%s' "<li><a data-asana-gid=\"${task_id}\"/></li>"
fi
done
printf '%s' '</ul>'
Expand Down Expand Up @@ -120,7 +120,8 @@ construct_release_announcement_task_description() {

update_task_description() {
local html_notes="$1"
local request_payload="{\"data\":{\"html_notes\":\"${html_notes}\"}}"
local escaped_html_notes=${html_notes//\"/\\\"}
local request_payload="{\"data\":{\"html_notes\":\"${escaped_html_notes}\"}}"

curl -fLSs -X PUT "${asana_api_url}/tasks/${release_task_id}?opt_fields=permalink_url" \
-H 'Content-Type: application/json' \
Expand Down

0 comments on commit bd3cebf

Please sign in to comment.