Skip to content

Strip track changes spans from ingested HTML

Dan Visel requested to merge strip-track-changes into main

This modifies the upload.js file in component-submit to remove all <span>s that come in with the class name format-change or deletion and unwraps <span>s with the class name insertion. Effectively, this accepts all tracked changes and throws away the data. (I'm not sure that we could have actually done anything with the data attached to format-change; the metadata attached to insertion or deletion doesn't necessarily match the internal metadata for Wax-native track changes.)

This was necessary as documents with large numbers of tracked changes (>1000) were making Wax unstable.

This is not an efficient fix: xSweet is going out of its way to send the track changes data to us, and it would be smarter to just turn this off. This is also not very efficient because it's happening entirely client-side. But it does work.

Merge request reports