From 3d3d6d6e22fc7d033b2cc12c4ccd910e5ff0866b Mon Sep 17 00:00:00 2001 From: Twangboy Date: Wed, 22 Jan 2025 13:38:23 -0700 Subject: [PATCH] Add changelog --- changelog/66992.fixed.md | 2 ++ tests/pytests/unit/modules/win_lgpo/test_admx_policies.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/66992.fixed.md diff --git a/changelog/66992.fixed.md b/changelog/66992.fixed.md new file mode 100644 index 00000000000..434fb1bb6a2 --- /dev/null +++ b/changelog/66992.fixed.md @@ -0,0 +1,2 @@ +Fixes an issue with the LGPO module when trying to parse ADMX/ADML files +that have a space in the XMLNS url in the policyDefinitionsResources header. diff --git a/tests/pytests/unit/modules/win_lgpo/test_admx_policies.py b/tests/pytests/unit/modules/win_lgpo/test_admx_policies.py index 3738ad5d36c..f20e9149340 100644 --- a/tests/pytests/unit/modules/win_lgpo/test_admx_policies.py +++ b/tests/pytests/unit/modules/win_lgpo/test_admx_policies.py @@ -772,6 +772,8 @@ def test__encode_xmlns_url(): Spaces in the xmlns url should be converted to %20 """ line = '' - result = re.sub(r'(.*)(\bxmlns(?::\w+)?)\s*=\s*"([^"]+)"(.*)', win_lgpo._encode_xmlns_url, line) + result = re.sub( + r'(.*)(\bxmlns(?::\w+)?)\s*=\s*"([^"]+)"(.*)', win_lgpo._encode_xmlns_url, line + ) expected = '' assert result == expected