diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index f422dfab67..4c97899be4 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -2000,21 +2000,25 @@ function oninitialload () var failures = doc.SelectNodes ("//test-case[@result='Error' or @result='Failure']").Cast ().ToArray (); if (failures.Length > 0) { writer.WriteLine ("
"); + writer.WriteLine (""); writer.WriteLine ("
"); } } } catch (Exception ex) { - writer.WriteLine ($"Could not parse {log.Description}: {System.Web.HttpUtility.HtmlEncode (ex.Message)}
"); + writer.WriteLine ($"Could not parse {log.Description}: {HtmlFormat (ex.Message)}
"); } } } @@ -2035,6 +2039,12 @@ function oninitialload () } Dictionary> log_data = new Dictionary> (); + static string HtmlFormat (string value) + { + var rv = System.Web.HttpUtility.HtmlEncode (value); + return rv.Replace ("\t", "    ").Replace ("\n", "
\n"); + } + static string LinkEncode (string path) { return System.Web.HttpUtility.UrlEncode (path).Replace ("%2f", "/").Replace ("+", "%20");