[PR #19044] Gently rework icon and background image validation #31691

Closed
opened 2026-01-31 09:48:52 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19044

State: closed
Merged: Yes


Right now, image validation accepts web-sourced icons (boo) and rejects images whose paths begin with \\?\. In addition, it will warn the user for things out of their control like images set by fragments.

This pull request adds a filesystem path validator (which accepts images with fully-qualified paths and UNC paths), makes the URI validator reject any web-origin URIs (only file and ms-* are allowable), and suppresses warnings for any images that were not directly set by the user.

Since we want to avoid using fragment images that fail validation, we no longer Clear each image property but rather set it to the blank or fallback value.

This does not actually add support for images at absolute paths beginning with \\?\. Such images are still rejected by Image and the other XAML fixtures we use for images. It's better than a warning, though.

Closes #18703
Closes #14143
Refs #18710
Refs #5204
Related to #18922 (http-origin icons will be blank everywhere and not just the jump list 😉)

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19044 **State:** closed **Merged:** Yes --- Right now, image validation accepts web-sourced icons (boo) and rejects images whose paths begin with `\\?\`. In addition, it will warn the user for things out of their control like images set by fragments. This pull request adds a filesystem path validator (which accepts images with fully-qualified paths and UNC paths), makes the URI validator reject any web-origin URIs (only `file` and `ms-*` are allowable), and suppresses warnings for any images that were not _directly_ set by the user. Since we want to avoid using fragment images that fail validation, we no longer `Clear` each image property but rather set it to the blank or fallback value. This does **not** actually add support for images at absolute paths beginning with `\\?\`. Such images are still rejected by `Image` and the other XAML fixtures we use for images. It's better than a warning, though. Closes #18703 Closes #14143 Refs #18710 Refs #5204 Related to #18922 (http-origin icons will be blank everywhere and not just the jump list :wink:)
claunia added the pull-request label 2026-01-31 09:48:52 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31691