Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
var xml = [];
var Question = "Foo";
xml[xml.length] = "<text><![CDATA[<p>"+Question+"<br></p>]]\></text>";
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
FWIW — it's maybe related, maybe it's not: I also had some problems with the ESTK, InDesign CS5 and a ![CDATA-error.
If I ran a script on an InDesign Table object and tried to read out or to assign its contents value the ESTK always throws an error: "![CDATA"
However if I ran the script from InDesign CS5, no error was thrown. That specific error went away with the CS6 version of the ESTK.
Uwe
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
ESTK passes the script to Indesign (using BridgeTalk) as a xml object, with the actual javascript code embedded in a CDATA, so it seems that is he root of the problem (the "inner", script embedded CDATA tag is not escaped).
However, i just tested again the code using ESTK CC, and both original snippets seem to work just fine.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more