Does Lucee Require Remote CFCs to Output Well-Formed XML? (ACF codebase)

Hi folks,

New to Lucee, and I’m testing a legacy ACF codebase on it to see what updates are needed, and the first thing I ran into has me a bit stuck. It seems like Lucee wants the output of access=remote cffunctions to be well-formed XML, and throws an error if it is not. In this codebase the output is HTML/Javascript that is not well-formed XML (some semicolon issues in JS, unclosed LINK tags, etc.).

I have tried changing the function’s RETURNTYPE, RETURNFORMAT, and PRODUCES attributes to no avail. Note that RETURNFORMAT=“text” returns a plaintext (unrendered) representation of the markup to the browser without issue. Have I missed a setting there? Or is there a way to force Lucee to be less strict about the well-formedness of the XML? Or must remote functions always return well-formed XML?

If it matters, I spun up the Lucee 5 instance using CommandBox, which seemed like a good way to run it side-by-side with (and isolated from) my local ACF installation running on IIS.

Thank you!


P.S. Lucee throws the error like so:

In Firefox it shows what looks to be an empty Lucee error dump box, and I can only see the error in the FF console, which reads: “XML Parsing Error: not well-formed”.

In Chrome it shows an error box on a page that reads: “This page contains the following errors: error on line 150 at column 7357: EntityRef: expecting ‘;’ Below is a rendering of the page up to the first error.”