fix(mac): allow display of package help file linked content 🍎 - #16458
Open
sgschantz wants to merge 1 commit into
Open
fix(mac): allow display of package help file linked content 🍎#16458sgschantz wants to merge 1 commit into
sgschantz wants to merge 1 commit into
Conversation
.pdf, .txt and .png files will now be loaded locally when linked from help files in package Fixes: #9628
User Test ResultsTest specification and instructions Test Artifacts |
Open
8 tasks
Contributor
mcdurdin
reviewed
Sep 1, 2026
Comment on lines
+16
to
+17
| private static let allowedLocalExtensions = ["pdf", "txt", "png", "jpg", "jpeg"] | ||
| private static let allowedMimeTypes = ["application/pdf", "text/plain", "image/jpeg", "image/png"] |
Member
There was a problem hiding this comment.
I am uncomfortable with this. There may be many other file types included, e.g. webp, gif, videos, css, fonts. This is hard to whitelist correctly.
Is this for navigation operations only?
Comment on lines
+114
to
+120
| if let mimeType = navigationResponse.response.mimeType { | ||
| if PackageContentWebView.allowedMimeTypes.contains(mimeType) { | ||
| decisionHandler(.allow) | ||
| return | ||
| } | ||
| } | ||
| decisionHandler(.allow) |
Member
There was a problem hiding this comment.
This seems to be a nothing test? both code paths give decisionHandler(.allow)
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.

.pdf, .txt and .png files are loaded locally when linked from help files in package
Fixes: #9628
Build-bot: release:mac
Test-bot: skip
User Testing
Run Keyman Configuration and install the Syriac/Aramaic keyboard
Select the ? icon to open the help for the package
Click on the 'Aramaic (Hebrew layout)' link to load that child page
Click on both 'Font license' text link and the 'Font documentation' PDF link to verify that they load correctly