SQLcl not producing valid xml output
I'm using SQLcl (build 22.4.0.342.1215) to spool out data and while testing discovered that when sqlformat is set to XML the character sequence "]]>" is not correctly escaped within the CDATA element. I understand that the benefit of CDATA is that we don't have to escape most characters, but the specific sequence "]]>" is not allowed inside a CDATA element as per the w3c specification.
I believe the proper behavior would be to take any instance of this substring and escape ">" as ">". I know it sounds nitpicky, but this becomes very annoying if there happens to be a lot of xml data in the database, and I feel like it's in line with the goals of sqlcl to fix this kind of problem, since you're already escaping characters in other output formats.