Skip to content

Commit 3177e73

Browse files
authored
Merge pull request #246 from puppetlabs/fix-task-helper-escapes
Fix json escaping in bash task-helper
2 parents 4fae425 + 6926c06 commit 3177e73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

files/task_helper.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ task-json-escape() {
165165
# 6. Delete any remaining non-printable lines from the stream
166166
sed -e 's/\\/\\/g' \
167167
| { iconv -t ASCII --unicode-subst="\u%04x" || cat; } \
168-
| sed -e 's/"/\\"/' \
168+
| sed -e 's/"/\\"/g' \
169169
-e 's/\//\\\//g' \
170-
-e "s/$(printf '\b')/\\\b/" \
171-
-e "s/$(printf '\f')/\\\f/" \
170+
-e "s/$(printf '\b')/\\\b/g" \
171+
-e "s/$(printf '\f')/\\\f/g" \
172172
-e 's/\r/\\r/g' \
173173
-e 's/\t/\\t/g' \
174174
-e "s/$(printf "\x1b")/\\\u001b/g" \

0 commit comments

Comments
 (0)