Decode element name before matching virtual wrapper in _initStartElement - #893
Open
Sahana2524 wants to merge 1 commit into
Open
Decode element name before matching virtual wrapper in _initStartElement#893Sahana2524 wants to merge 1 commit into
_initStartElement#893Sahana2524 wants to merge 1 commit into
Conversation
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.
Unwrapped repeated elements are matched against the active virtual wrapper by raw element name, but the wrapper holds the name after
XmlNameProcessordecoding (repeatStartElementstores the decoded_localName/_namespaceURI).<encoded>element never matches its own wrapper, so each item closes the virtual array and only the last one survivesuseWrapping=falselist under the always-on base64 processor silently yields a 1-item list, with no exception to signal the loss_handleRepeatElementand_handleEndElementalready operate on decoded names, so_initStartElementwas the only spot comparing before decodingFix decodes the name up front and matches on the decoded value; the delayed-replay branch keeps the raw name since
_handleRepeatElementdecodes it again downstream. Added round-trip tests for the always-on and colliding-prefix base64 processors (both fail on the current tree).