Skip to content

Commit

Permalink
junit: Fix control char escaping in Bash <4.3
Browse files Browse the repository at this point in the history
Otherwise would contain the \
  • Loading branch information
martin-schulze-vireso committed Sep 23, 2022
1 parent 1aebe81 commit bf7b7e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/bats-core/bats-format-junit
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ xml_escape() {
output=${output//'"'/\&quot;}
output=${output//\'/\&#39;}
local CONTROL_CHAR=$'\033'
output="${output//$CONTROL_CHAR/\&#27;}"
output=${output//$CONTROL_CHAR/\&#27;}
printf "%s" "$output"
}

Expand Down

0 comments on commit bf7b7e8

Please sign in to comment.