From: Theodore Ts'o Date: Sat, 19 May 2018 17:43:10 +0000 (-0400) Subject: report: make sure control charcters are encoded in xUnit report X-Git-Tag: v2022.05.01~1549 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b13f51d57153b697b6a29654e5aeb176945f16bb;p=xfstests-dev.git report: make sure control charcters are encoded in xUnit report Control characters (such as backspace, used in progress reports by mkfs.ext4, for example) can make Python's XML parsers choke, claiming that it is an invalid XML document. Signed-off-by: Theodore Ts'o Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/report b/common/report index ffa23719..a62d343e 100644 --- a/common/report +++ b/common/report @@ -27,11 +27,12 @@ REPORT_ENV_LIST="$REPORT_ENV_LIST OVL_WORK" encode_xml() { - sed -e 's/&/\&/g' \ - -e 's/>/\>/g' \ - -e 's//\>/g' \ + -e 's/