MicrosoftGame.config: attribute values with their character references replaced #51
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/52"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by gefydev on 2026-11-22T22:35:50Z.
xml_attrs(launcher.rs) returns attribute values as they are written inMicrosoftGame.config. A&in an attribute has to be written&, so since9a15c53a game called "Ratchet & Clank" getsXCL – Ratchet & Clankas its window title. The same reader gives theExecutable Namevalues, and an escaped character there names a file that doesn't exist.Values now go through a small
xml_unescape: the five named references (&<>"') and numeric ones (','). Anything that isn't a valid reference (a bare&, ,&#xZZ;) stays as written.Validation
attribute_values_have_their_character_references_replaced, and a&case indisplay_name_is_the_shell_name_unless_it_is_a_resource. Both fail onmainand pass with the change.cargo test -p xcl --lib: 340 passed, 0 failed, on Windows GNU under Wine.Imported from ivall/xcl. Originally posted by ivall on 2026-11-22T22:41:03Z.
Thanks, merged, and good catch on my
9a15c53!The decoder looks right to me:
&or stays as written;'with an upper-case X stays too, which matches XML, where hex references take a lower-casex.The values it touches are the
Executablenames, theIdentityname and the display name. Of those, only the display name and the exe names can contain a&; package identities can't.All tests pass with the MSVC toolchain on Windows: 343 lib tests with your new one, plus the e2e test title. My four titles' configs have no
&at all, so nothing changes for them.