[Webkit-unassigned] [Bug 35130] importNode cannot import a CDATA element into an HTML document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 22 12:53:47 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=35130


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|importNode throws exception |importNode cannot import a
                   |if it encounters a          |CDATA element into an HTML
                   |<![CDATA[ ]]>               |document
                 CC|                            |annevankesteren+webkit at gmai
                   |                            |l.com, ian at hixie.ch




--- Comment #9 from Alexey Proskuryakov <ap at webkit.org>  2011-09-22 12:53:46 PST ---
This happens because we refuse to create CDATA sections in HTML documents:

PassRefPtr<CDATASection> Document::createCDATASection(const String& data, ExceptionCode& ec)
{
    if (isHTMLDocument()) {
        ec = NOT_SUPPORTED_ERR;
        return 0;
    }
    return CDATASection::create(this, data);
}

Not sure if this is correct or not - CDATA certainly makes no sense in HTML. FWIW, a direct call to document.createCDATASection() also raises an exception in Firefox in HTML documents - maybe it just skips over those when cloning, or converts them to text nodes?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list