Skip to content

Avm2 xml nul charref - #25089

Open
va-moviestarplanet wants to merge 2 commits into
ruffle-rs:masterfrom
va-moviestarplanet:avm2-xml-nul-charref
Open

va-moviestarplanet wants to merge 2 commits into
ruffle-rs:masterfrom
va-moviestarplanet:avm2-xml-nul-charref

Conversation

@va-moviestarplanet

Copy link
Copy Markdown

Description

Encountered an issue where MovieStarPlanet’s text fields beginning with �, shows up as visible “&#00:” text in Ruffle.
Caused by an issue where AVM2 XML, such as ; �, �, � and similar stay as text.
In Flash these decode to a NUL character in text and attributes. Checked in Adobe AIR 50.
The changes only affect AVM2, AVM1 is untouched.

Testing

SWF test avm2/xml_unescaping_nul_char_ref will fails on every line without the fix, and its expected output was recorded in AIR. The existing avmplus test bug_478501 now passes, so its known_failure is removed.

Checklist

  • [x ] I, a human, have self-reviewed this PR and fully understand the changes within.
  • [x ] I have made or updated tests where possible.
  • [x ] All of my commits are properly scoped, compile successfully, and pass all tests.
  • [x ] This PR does not make sense to split up into smaller PRs.
  • [x ] An LLM was involved in the authoring of this code.

va-moviestarplanet and others added 2 commits November 3, 2026 09:10
Flash Player decodes `�` and `�` in XML text and attributes to
a NUL character, and escapes it back as `�`. quick-xml rejects code
point 0, so Ruffle kept the reference as literal text. AVM1 is left
unchanged, as it hasn't been checked against Flash Player.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover decimal and hex NUL references in text and attributes, and
writing NUL back out with toXMLString(). The expected output was
recorded in Adobe AIR 50.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant