Improve xml.xml_escape() to handle non-printable characters - #514
Merged
Conversation
Tieske
reviewed
Jan 28, 2026
Tieske
left a comment
Member
There was a problem hiding this comment.
CI is failing... did you even test this? Looks AI generated afaict.
Tieske
requested changes
Jan 28, 2026
Tieske
left a comment
Member
There was a problem hiding this comment.
Also there's just tests escaping, it should also get tests doing a roundtrip.
1. Incorrect UTF-8 handling (was escaping 128-255, breaking multi-byte chars) 2. Wrong test expectations for high byte values 3. Test code merge issues during editing
Contributor
Author
|
Yes, the test cases are AI-generated. According to the review comments, I've also modified the roundtrip process. |
Tieske
approved these changes
Jan 29, 2026
Tieske
reviewed
Jan 29, 2026
Member
|
@yeshan333 so my fix wasn't complete. The pattern is now valid, but not working as designed. Can you please have another look? |
Tieske
reviewed
Jan 29, 2026
Tieske
approved these changes
Jan 31, 2026
Member
|
Thx @yeshan333 ! |
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.
Rename
escape_tabletoxml_escape_tableand enhance the XML escaping functionality to handle non-printable control characters and preserve high bytes for UTF-8 support. Update tests to cover new escaping behavior.