From 87e06de8d133d1286773b6d941ba3d68a582eb6a Mon Sep 17 00:00:00 2001 From: Blair55 Date: Sun, 21 May 2017 02:05:57 +0100 Subject: [PATCH] XmlEncode failure message in JUnitReporter --- src/canopy/reporters.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/canopy/reporters.fs b/src/canopy/reporters.fs index 7331cf57..46f74d1a 100644 --- a/src/canopy/reporters.fs +++ b/src/canopy/reporters.fs @@ -435,7 +435,9 @@ type JUnitReporter(resultFilePath:string) = |> Seq.map(fun id -> sprintf "" id (getTestTime id)) let failedTestsXml = failedTests - |> Seq.map(fun (ex, id) -> sprintf "%s" id (getTestTime id) ex.Message) + |> Seq.map(fun (ex, id) -> + Security.SecurityElement.Escape ex.Message + |> sprintf "%s" id (getTestTime id)) let testCount = passed + failed let testTimeSum = testTimes |> Seq.sumBy snd let allTestsXml = String.Join(String.Empty, Seq.concat [passedTestsXml; failedTestsXml])