Helix: Decode HTML entities in the test comment field (#15141

I have observed the test comment coming back from Helix with `"`
and friends in it.

It ends badly as you might imagine.

This unescape will be a no-op if the data is already well-formed.
This commit is contained in:
Dustin L. Howett 2023-04-10 15:17:29 -05:00 committed by GitHub
parent ea44375f6d
commit 90bbd2927d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ foreach ($testRun in $testRuns.value)
foreach ($testResult in $testResults.value)
{
$info = ConvertFrom-Json $testResult.comment
$info = ConvertFrom-Json ([System.Web.HttpUtility]::HtmlDecode($testResult.comment))
$helixJobId = $info.HelixJobId
$helixWorkItemName = $info.HelixWorkItemName