When removing smart tags, also remove smart tag properties (if present) #174
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.
Greetings! I'm the maintainer of another fork of OpenXmlPowerTools. I noticed you have what seems to be the most-frequently maintained fork, so I wondered if you would mind if I submitted some pull requests for several bug fixes I have made over the past several years? In all cases I'll try to include appropriate unit tests so you can see exactly what triggers the buggy behavior. If this PR looks okay I will submit several others.
In this case, the bug is caused by DOCX files containing (probably old, perhaps deprecated, but nevertheless encountered in real life!) "smart tags", specifically when those smart tags contain custom properties. The MarkupSimplifier, when asked to remove smart tags from documents, removes them but does NOT remove the "properties" associated with them, which leaves the resulting document in a corrupt state. The fix is, when removing smart tags, to also check for smart tag properties and remove them at the same time.