I’ve been working on a php DOM-related project lately trying to wrap the built-in DOM, so been pouring over the spec a bit. I’m sure others have noticed this before. You can’t create CDATA nodes in an html document, but you can import them from an xml document and append. Why? If CDATA nodes aren’t in the HTML spec then why are they allowed to be imported? Seems to me if the document is an html document they should be imported as regular text nodes.

Sign in to participate in the conversation

Single user instance for Dustin Wilson