Calling serializejson on a caught exception variable, results in any double quote characters within the codeprinthtml values within the stack trace to not be escaped.
See output from https://trycf.com/gist/64c921693ceafa89ce5f7a22d3071eca/lucee5?theme=monokai
… there should be a \ before char 667, 672, 682, and 686 - and so on for any other codeprinthtml values within the output.
I've not been able to reproduce this with a simpler (and non exception-related) use case... not sure if this is specific to serialization of an exception, or if there if this is a more general exception.
I just said this in Slack, but I don't think this is a bug any longer. The quotes are being stored in the original exception as " and you're not encoding the JSON for HTML when outputting it in your example.