Skip to content

Conversation

@jiripolasek
Copy link
Collaborator

Summary of the Pull Request

The XmlDocumentEx::Print method previously used <\\ to close XML tags, which is invalid. This commit replaces <\\ with </ to ensure proper XML closing tag syntax.

Changes include:

  • Replacing <\\ with </ in three instances where closing tags are generated.
  • Ensuring the XML output conforms to standard XML syntax.

These changes improve the correctness of the XML output generated by the method.

image

PR Checklist

  • Closes: BugReport: XML files have invalid closing tag #42390
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated:

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

The `XmlDocumentEx::Print` method previously used `<\\` to close XML tags, which is invalid. This commit replaces `<\\` with `</` to ensure proper XML closing tag syntax.

Changes include:
- Replacing `<\\` with `</` in three instances where closing tags are generated.
- Ensuring the XML output conforms to standard XML syntax.

These changes improve the correctness of the XML output generated by the method.
@jiripolasek
Copy link
Collaborator Author

One interesting point: the XML generated for event viewer entries isn't valid XML but rather a collection of XML fragments. It might not matter much to most people, but it's still worth noting when discussing this.

@zadjii-msft zadjii-msft added Hot Fix Items we will product an out-of-band release for Product-Command Palette Refers to the Command Palette utility labels Oct 17, 2025
@michaeljolley michaeljolley merged commit bc8adb3 into microsoft:main Oct 20, 2025
10 checks passed
khmyznikov pushed a commit that referenced this pull request Oct 20, 2025
…entEx (#42399)

## Summary of the Pull Request

The `XmlDocumentEx::Print` method previously used `<\\` to close XML
tags, which is invalid. This commit replaces `<\\` with `</` to ensure
proper XML closing tag syntax.

Changes include:
- Replacing `<\\` with `</` in three instances where closing tags are
generated.
- Ensuring the XML output conforms to standard XML syntax.

These changes improve the correctness of the XML output generated by the
method.

<img width="1014" height="499" alt="image"
src="https://github.com/user-attachments/assets/a9ff6e47-6976-4290-a4f0-c23b0c773d61"
/>


<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #42390
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [x] **New binaries:** Added on the required places
- [x] **Documentation updated:** 

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
@khmyznikov khmyznikov mentioned this pull request Oct 20, 2025
khmyznikov added a commit that referenced this pull request Oct 21, 2025
Hotfixes #42467 #42434 #42405 #42399

---------

Co-authored-by: Jiří Polášek <[email protected]>
Co-authored-by: Niels Laute <[email protected]>
Co-authored-by: Jaylyn Barbee <[email protected]>
Co-authored-by: Gordon Lam <[email protected]>
Co-authored-by: Dustin L. Howett <[email protected]>
@yeelam-gordon yeelam-gordon requested a review from Copilot November 7, 2025 01:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a critical bug in XML output formatting where closing tags were incorrectly using backslashes (<\) instead of forward slashes (</), resulting in malformed XML.

  • Fixed three instances of incorrect XML closing tag syntax from <\tagname> to </tagname>
  • Corrected closing tags for nodes without children, nodes with single text children, and nodes with nested children
  • Ensures the XML output conforms to proper XML syntax standards

mirmirmirr pushed a commit to mirmirmirr/PowerToys that referenced this pull request Nov 9, 2025
…entEx (microsoft#42399)

## Summary of the Pull Request

The `XmlDocumentEx::Print` method previously used `<\\` to close XML
tags, which is invalid. This commit replaces `<\\` with `</` to ensure
proper XML closing tag syntax.

Changes include:
- Replacing `<\\` with `</` in three instances where closing tags are
generated.
- Ensuring the XML output conforms to standard XML syntax.

These changes improve the correctness of the XML output generated by the
method.

<img width="1014" height="499" alt="image"
src="https://github.com/user-attachments/assets/a9ff6e47-6976-4290-a4f0-c23b0c773d61"
/>


<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: microsoft#42390
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [x] **New binaries:** Added on the required places
- [x] **Documentation updated:** 

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
@yeelam-gordon yeelam-gordon added this to the PowerToys 0.96 milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hot Fix Items we will product an out-of-band release for Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BugReport: XML files have invalid closing tag

4 participants