From b519da38091737101034fb5d708ef09a00c51172 Mon Sep 17 00:00:00 2001 From: Abhishek Arya Date: Sun, 19 Feb 2017 22:30:59 -0800 Subject: [PATCH] Fix check to escape control characters, CDATA end sequence --- infra/base-images/base-runner/test_report | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infra/base-images/base-runner/test_report b/infra/base-images/base-runner/test_report index 2f88e1eab..62365dabb 100755 --- a/infra/base-images/base-runner/test_report +++ b/infra/base-images/base-runner/test_report @@ -61,8 +61,9 @@ for FUZZER_BINARY in $(find $OUT/ -executable -type f); do OUT_TXT=$(cat $FUZZER_STDOUT) - # Strip non-ascii characters. - OUT_TXT=${OUT_TXT//[^[:ascii:]]/} + # Escape non-printable characters and CDATA end sequence. + OUT_TXT=${OUT_TXT//[^[:print:]]/?} + OUT_TXT=${OUT_TXT//]]>/?} REPORT_TEXT=$(cat <<-EOF