diff --git a/PowerShell/ScubaGear/Modules/Orchestrator.psm1 b/PowerShell/ScubaGear/Modules/Orchestrator.psm1 index 084ec40339..2010a979af 100644 --- a/PowerShell/ScubaGear/Modules/Orchestrator.psm1 +++ b/PowerShell/ScubaGear/Modules/Orchestrator.psm1 @@ -849,7 +849,7 @@ function Format-PlainText { $CleanString = $CleanString -replace '(.*)()(.*)()(.*)', '$1$5, $3$7' $CleanString = $CleanString.Replace("<", "<") $CleanString = $CleanString.Replace(">", ">") - $CleanString = $CleanString.Replace("&", "&") + #$CleanString = $CleanString.Replace("&", "&") $CleanString } } @@ -1064,7 +1064,6 @@ function Merge-JsonOutput { # Convert the output a json string $MetaData = ConvertTo-Json $MetaData -Depth 3 $Results = ConvertTo-Json $Results -Depth 5 - # Loop through each property $Summary = ConvertTo-Json $Summary -Depth 3 $ReportJson = @" { @@ -1080,7 +1079,7 @@ function Merge-JsonOutput { $ReportJson = $ReportJson.replace("\u003c", "<") $ReportJson = $ReportJson.replace("\u003e", ">") $ReportJson = $ReportJson.replace("\u0027", "'") - $ReportJson = $ReportJson.replace("\u0026", "&") + $ReportJson = $ReportJson.replace("$amp;", "&") # Save the file $JsonFileName = Join-Path -Path $OutFolderPath "$($OutJsonFileName).json" -ErrorAction 'Stop' diff --git a/PowerShell/ScubaGear/Testing/Unit/PowerShell/Orchestrator/Format-PlainText.Tests.ps1 b/PowerShell/ScubaGear/Testing/Unit/PowerShell/Orchestrator/Format-PlainText.Tests.ps1 index 44c0db66dd..76459c3c5e 100644 --- a/PowerShell/ScubaGear/Testing/Unit/PowerShell/Orchestrator/Format-PlainText.Tests.ps1 +++ b/PowerShell/ScubaGear/Testing/Unit/PowerShell/Orchestrator/Format-PlainText.Tests.ps1 @@ -34,7 +34,7 @@ InModuleScope Orchestrator { } It 'Reformats links with special symbols' { $Output = Format-PlainText 'See this example for more details.' - $Output | Should -Be "See this example, https://example.com#anchor?p1=v1&p2=v2 for more details." + $Output | Should -Be "See this example, https://example.com#anchor?p1=v1&p2=v2 for more details." } It 'Reformats links without target' { $Output = Format-PlainText 'See this example for more details.' @@ -42,7 +42,7 @@ InModuleScope Orchestrator { } It 'Reformats links when there is no trailing content' { $Output = Format-PlainText 'See this example.' - $Output | Should -Be "See this example, https://example.com#anchor?p1=v1&p2=v2." + $Output | Should -Be "See this example, https://example.com#anchor?p1=v1&p2=v2." } } }