-
Type:
Bug
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Export
-
High
-
None
-
Fix Export of track changes in sdlxliff
-
None
-
Emptyshow more show less
Problem
Found edge case of track changes, term tag and internal tag combination that leads to error on SDLXLIFF with preserved track changes file export.
In the outer body-child loop, when a <mrk> element was encountered and its first matched internal tag happened to be of type 'single' (e.g. an NBSP char tag early in the mrk's content), the entire mrk was naively restored as a text node and removed from the DOM. This bypassed the proper mrk-context processing, so closing tags for ids 77 and 76 were restored as bare </g> (without IDs) instead of being handled as <g id="N" sdl:start="false"/>.
Solution
Add && $node->nodeName !== 'mrk' to the 'single' fast-path guard, so mrk body children always proceed to the dedicated mrk-context processing.
Test
Don't know of an easy way to reproduce this case manually.
Test case for automatic tests is created.