Repository navigation
fix(build): XML-escape config values interpolated into Info.plist - #15
Merged
Merged
Conversation
The macOS build interpolates cfg strings (title, id, version, size, urlScheme/fileExtensions lists, permission usage strings, chrome vibrancy) into the bundle's Info.plist raw. A & or < in any of them — 'Tom & Jerry <Deck>' as a title, say — makes the plist invalid XML: plutil -lint fails, and the bundle can't be opened (LaunchServices reports 'executable is missing') even though codesign signs it fine and the bare binary runs. url and userAgent were already escaped; everything else wasn't. Adds an escXml() helper and routes every cfg interpolation through it, including the two hand-rolled replace chains. Verified on macOS 26: before, a title containing ' & ' + '<Deck>' produces a bundle open() refuses; after, plutil -lint passes, codesign --verify --strict --deep passes, and the .app launches normally.
Owner
|
Thanks @slabbdev this has been merged into main with some very small changes (just removing some chars that are not allowed). Thanks for finding this. |
tarwin
added a commit
that referenced
this pull request
Sep 28, 2026
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.
What
The macOS build interpolated cfg strings into the bundle's
Info.plistraw:title,id,version,size, theurlScheme/fileExtensionslists, the permission usage strings, and chromevibrancy. OnlyurlanduserAgentwere escaped. A&or<in any of the others produces invalid XML —plutil -lintrejects it and LaunchServices can't resolve the bundle, even thoughcodesignsigns it fine and the bare binary runs.url/userAgent's hand-rolled replace chains are folded into the same helper.Repro (before this change)
Scaffold an app, set
"title": "Tom & Jerry <Deck>",tinyjs build:After this change
Same app, same build:
escXml()escapes& < > ". Interpolations covered: window size, readAccess, userAgent, url, downloads, popups, chrome vibrancy, URL name + schemes, microphone/camera/speech usage strings, audio-capture reason, document type name + extensions, and the five root plist values (name, display name, identifier, version, executable).