From 6926c06732f0ebf81b61577578721ea1f43f0fa3 Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Mon, 11 Apr 2022 16:25:29 -0700 Subject: [PATCH] Fix json escaping in bash task-helper A few missing /g instructions prevented successful complete string escapes. This adds the missing /g directives. --- files/task_helper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/task_helper.sh b/files/task_helper.sh index bfd55026..4375735d 100644 --- a/files/task_helper.sh +++ b/files/task_helper.sh @@ -165,10 +165,10 @@ task-json-escape() { # 6. Delete any remaining non-printable lines from the stream sed -e 's/\\/\\/g' \ | { iconv -t ASCII --unicode-subst="\u%04x" || cat; } \ - | sed -e 's/"/\\"/' \ + | sed -e 's/"/\\"/g' \ -e 's/\//\\\//g' \ - -e "s/$(printf '\b')/\\\b/" \ - -e "s/$(printf '\f')/\\\f/" \ + -e "s/$(printf '\b')/\\\b/g" \ + -e "s/$(printf '\f')/\\\f/g" \ -e 's/\r/\\r/g' \ -e 's/\t/\\t/g' \ -e "s/$(printf "\x1b")/\\\u001b/g" \