fix: strip Collapsed attribute from sanitized output#182
Merged
Conversation
FileMaker's SaXML export now includes Collapsed as both an XML attribute on Step elements and as a Boolean parameter type, reflecting the UI collapse state of blocks in the Script Workspace. The exploder was surfacing this as literal text in sanitized output: If [ Collapsed: OFF ; $errorFind = 401 ] Else [ Collapsed: OFF ; Collapsed: OFF ] Two fixes: 1. xml_utils.rs: add "Collapsed" to the de-noise filter in start_element_to_string so the attribute is stripped from reconstructed XML in normal (lossy) mode. 2. boolean.rs: return None from display() when Boolean type is "Collapsed" — this is a UI-only visual state that should never appear in sanitized output regardless of step context. Add unit tests for both fixes. Update affected snapshots. Fixes bc-m#178
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.
Summary
FileMaker's SaXML export now includes
Collapsedas both an XML attribute on<Step>elements and as a
Booleanparameter type, reflecting the UI collapse state of blocksin the Script Workspace. The exploder was surfacing this in sanitized output:
Fix (two parts)
src/utils/xml_utils.rs— add"Collapsed"to the de-noise filter instart_element_to_string, stripping the attribute from reconstructed XML in normal(lossy) mode. Preserved in lossless mode.
src/script_steps/parameters/boolean.rs— returnNonefromdisplay()whenBoolean type="Collapsed". This is a UI-only visual state that carries no semanticmeaning in the script and should never appear in sanitized output.
Tests
xml_utils.rs:test_collapsed_attribute_stripped_in_lossy_mode,test_collapsed_attribute_preserved_in_lossless_modeboolean.rs:test_collapsed_returns_noneFixes #178