[whatwg] Serializing HTML fragments (9.4)
bzbarsky at MIT.EDU
Thu Jul 9 10:38:58 PDT 2009
Kartikaya Gupta wrote:
> Opera and Chrome will alert "<c1>some>stuff</c1>more<stuff" (escaping the angle bracket inside the child element) and Firefox just outputs "more<stuff" (presumably a bug).
It's actually rather purposeful, at least in terms of the code. It'd be
pretty easy to change to returning the textContent instead (so walking
See https://bugzilla.mozilla.org/show_bug.cgi?id=125746 for the history
here (the code has just been carried along since).
> I tried a couple of the other special elements (script and xmp) and they worked the same way. I think for compatibility the spec should say "If the parent of the current node is a" instead of "If one of the ancestors of current node is a" for the Text/CDATASection handling.
No opinion on this, honestly.
More information about the whatwg