Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Scripts/SettingsReportButton.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ $SettingsReportButton.Add_Click({
if ($overview) { $md += $overview } else { $md += '- No settings shared across multiple policies.' }
$md += @('', '| Policy Name | Setting | Description | Value |', '|-------------|---------|-------------|-------|')
foreach ($r in $reportItems) {
$md += "| $($r.PolicyName) | $($r.Setting) | $($r.Description) | $($r.ConfiguredValue) |"
# Issue #54: render each policy / value on its own line inside the cell.
$md += "| $($r.PolicyName -replace '; ','<br>') | $($r.Setting) | $($r.Description) | $($r.ConfiguredValue -replace '; ','<br>') |"
}
$md -join "`r`n" | Out-File -FilePath $dlg.FileName -Encoding UTF8
}
Expand Down Expand Up @@ -196,11 +197,11 @@ $SettingsReportButton.Add_Click({
$uniqPct = _pct $uniqueCount $totalSettings

$rowsHtml = foreach($r in $reportItems){
$policyEsc = [System.Web.HttpUtility]::HtmlEncode($r.PolicyName)
$policyEsc = (($r.PolicyName -split '; ') | ForEach-Object { [System.Web.HttpUtility]::HtmlEncode($_) }) -join '<br>' # issue #54: split then encode so one policy per line (keeps &amp; intact)
$settingEsc = [System.Web.HttpUtility]::HtmlEncode($r.Setting)
$descRaw = if($r.Description){ $r.Description } else { '' }
$descEsc = [System.Web.HttpUtility]::HtmlEncode(($descRaw -replace "`r?`n"," "))
$valEsc = [System.Web.HttpUtility]::HtmlEncode($r.ConfiguredValue)
$valEsc = (($r.ConfiguredValue -split '; ') | ForEach-Object { [System.Web.HttpUtility]::HtmlEncode($_) }) -join '<br>' # issue #54: one configured value per line
$platEsc = [System.Web.HttpUtility]::HtmlEncode($r.Platform)
$tagsHtml = ''
$dataTags = ''
Expand Down