Fix apostrophe in notification button content breaking XML#6239
Open
guimafelipe wants to merge 3 commits intomainfrom
Open
Fix apostrophe in notification button content breaking XML#6239guimafelipe wants to merge 3 commits intomainfrom
guimafelipe wants to merge 3 commits intomainfrom
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes invalid toast XML generation when AppNotificationButton content includes XML-special characters (notably apostrophes), preventing BuildNotification() failures like the COMException reported in #4996.
Changes:
- Escape
AppNotificationButtonm_contentviaEncodeXml()when generating the<action content='...'>payload. - Add unit tests validating correct XML escaping for button content (apostrophe and other special characters).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/AppNotificationBuilderTests/APITests.cpp | Adds regression tests ensuring button content is XML-escaped in the generated toast payload. |
| dev/AppNotifications/AppNotificationBuilder/AppNotificationButton.cpp | Applies EncodeXml() to button content during ToString() serialization to produce valid XML. |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Summary
EncodeXml()tom_contentinAppNotificationButton::ToString()to properly escape special XML characters (apostrophes, ampersands, etc.)SetToolTip,SetInputId, text, combobox items) already useEncodeXml()— button content was the only one missing itFixes #4996