Print one policy per line in the Settings Report (Fixes #54) - #73
Open
juandresrodca wants to merge 1 commit into
Open
Print one policy per line in the Settings Report (Fixes #54)#73juandresrodca wants to merge 1 commit into
juandresrodca wants to merge 1 commit into
Conversation
The Settings Report joined every policy that configures a shared setting into a single "; "-separated cell for the "Policy Name(s)" and "Configured Value" columns, so multi-policy settings rendered as one long line (issue MG-Cloudflow#54). Break those two cells on the "; " separator so each policy / value appears on its own line in the HTML and Markdown exports. For HTML the value is split before HTML-encoding so encoded entities such as "&" are not broken by the line-break replacement. CSV output is unchanged. Fixes MG-Cloudflow#54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Print one policy per line in the Settings Report (Fixes #54)
Problem
In the Settings Report export, when a setting is configured by more than one policy, the
"Policy Name(s)" column (and likewise the "Configured Value" column) is rendered as a single
"; "-joined line. For settings shared across several policies this becomes one long, hard-to-readline. Reported in #54 with a screenshot (the
AV - Tamper Internal; AV - Tamper Demo; …cell andthe
On; Offvalue cell).Fix
Scripts/SettingsReportButton.ps1builds thePolicy Name(s)andConfigured Valuevalues byjoining with
"; ". This change breaks those two cells onto one item per line in both the HTMLand Markdown exports:
"; ", HTML-encode each part, then join with<br>.Splitting before encoding matters — encoding first would turn
&into&and theline-break replacement could then break inside that entity (e.g.
Security & Compliance→Security &<br>Compliance). Splitting first avoids that."; "with<br>in the two cells (GitHub-flavoured Markdown renders<br>inside table cells).;as the field delimiter, and one-item-per-line there wouldmean embedded newlines.