[x3d-public] flaw in CDATACreateFunction in X3DJSONLD (from Andreas Plesch)

Yves Piguet yves.piguet at gmail.com
Tue Feb 28 15:20:17 PST 2017


Excuse me, I haven't followed the thread and its context closely enough to provide good advices. Here are general remarks:

- In html, <![CDATA[ ... ]]> is valid only in mathml and svg, not anywhere else <https://www.w3.org/TR/2016/REC-html51-20161101/syntax.html#sec-cdata-sections>
- For pretty-printed xml or json, I'd produce it manually with plain string concatenation and replacements, or JSON.stringify for json. But actually I wouldn't bother. Calerga VR doesn't. Syntactically correct xml (where <, >, &, " are encoded with entities) and json (with a double-quoted string and escaped double-quotes, backslashes, linefeeds and carriage returns) should be fine. Which user case do you want to address with marginally nicer-looking scripts? I don't think it's worth the trouble.

Yves

> On 28 Feb 2017, at 23:24, Andreas Plesch <andreasplesch at gmail.com> wrote:
> 
> Thanks for your input. So is there anything you would recommend with respect to John's CDATACreateFunction (see thread) ?




More information about the x3d-public mailing list