From 469408d29fd41114646be49c436756849ccce9c3 Mon Sep 17 00:00:00 2001
From: Mikael Karlsson <43226266+Micke-K@users.noreply.github.com>
Date: Tue, 25 Nov 2025 20:14:00 +1100
Subject: [PATCH] 3.10.1.11
Issue 380 - Additional format of XML for ADMX and Reg value
---
Core.psm1 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Core.psm1 b/Core.psm1
index 64beb69..eb279b8 100644
--- a/Core.psm1
+++ b/Core.psm1
@@ -2765,11 +2765,11 @@ function Update-XmlFormatting {
)
process {
- # 1. Fix empty xml elements → instead of
+ $Xml = $Xml -replace "`r`n", "`n"
+
$Xml = $Xml -replace '<([^\s/>]+)([^>]*)\s/>' , '<$1$2/>'
- # 2. Remove empty lines (lines containing only whitespace or nothing)
- $Xml = ($Xml -split "`r?`n") |
+ $Xml = ($Xml -split "`n") |
Where-Object { $_.Trim().Length -gt 0 } |
ForEach-Object { $_ } |
Out-String