[fix]: Replace invalid-XML control chars from data values on save#192
Merged
Conversation
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
eperedo
approved these changes
May 20, 2026
Contributor
eperedo
left a comment
There was a problem hiding this comment.
Looks good to me, thanks @deeonwuli
MiquelAdell
approved these changes
May 21, 2026
Contributor
MiquelAdell
left a comment
There was a problem hiding this comment.
tested by inputing the result of this command printf 'TEST1\vTEST2' | pbcopy it works
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.
📌 References
📝 Implementation
The client report surfaced a Bulk Load Excel export that failed to open in MS Excel (
error237400_01.xml: "Illegal xml character. Line 395, column 174" in/xl/sharedStrings.xml).Root cause: an invisible vertical tab (
\x0B) had been entered into a TEXT data value. XLSX is XML 1.0; XML 1.0 forbids most C0 control characters, so Excel rejected the file. LibreOffice silently strips these on save, which is why a LibreOffice round-trip "fixed" the file.This PR sanitizes data values at the save boundary in autogen-forms so the same characters never get persisted again:
Out of scope (sibling task in Bulk Load): historical bad values already in DHIS2 and values entered through other paths (DHIS2 web data entry, imports) still need a defensive strip on the Bulk Load xlsx export side. Bulk Load PR 399
#869dbc90g