-
Notifications
You must be signed in to change notification settings - Fork 4
Description
What?
Both EAD importer and the Sync (also EAD) importer use some fixed decisions on to what level to flatten XML. In specific for children (containers) of an EAD we do that often. The XML to ARRAY conversion is then encoded as JSON into a CSV cell. But. I have seen in the wild (incorrect XML) escaped double quotes inside XML values. When that happens , and since we are already not using an escape character in other places and encoding via UTF8 double quotes that are not field separators and actually inside values, we end with two types of encodings that drive the reverse process
(CSV back to JSON) crazy
Solution is simple. When no flattening is needed, also use | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT flags.
Nobody should have seen that happen before, but well, I did.