Auto-set musescoreDirectPNGPath when choosing MuseScore#1980
Merged
Conversation
…escaping env values configure.py: when the configuration assistant's MusicXML-reader dialog selects a MuseScore build (MuseScore.app, MuseScore 4.app, mscore, etc., matched by the new reMuseScoreName regex), also set musescoreDirectPNGPath to the same path so PNG/PDF generation works without further setup. Selecting a non-MuseScore reader leaves any existing musescoreDirectPNGPath untouched. The two "set to" messages are merged: MuseScore selections print "MusicXML Reader and PNG/PDF generator set to: ...". environment.py: _EnvironmentCore.__setitem__ manually ran saxutils.escape on string values, but toSettingsXML serializes through ElementTree, which already escapes attribute values (and parsing unescapes them). The manual pass double-escaped, so a path containing "&" was stored and returned as "&". Removed the manual escape (and the now-unused saxutils import); ElementTree handles it. Added testSpecialCharactersRoundTrip covering set -> escaped XML -> parse round-trip for a path with "&" and "<>". AI-assisted (Claude).
Closed
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.
Coauthored by @behdad-bahadivand-chegini whose idea this was in #1977 and #1979 . Supersede those PRs
configure.py: when selecting MuseScore as a MusicXML reader automatically set
musescoreDirectPNGPathto the same path. (we don't clear it when setting reader elsewhere)environment.py: fix bug where
&was twice corrected when writing& -> & -> &amp;and only once in reading. RT to XML properly now.AI-assisted (Claude) - myke read and guided