[Webkit-unassigned] [Bug 6390] Complex entities seem to fail on TOT

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Wed Jul 26 18:51:44 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=6390





------- Comment #1 from macdome at opendarwin.org  2006-07-26 18:51 PDT -------
This hack is what's causing this bug:

    // Work around a libxml SAX2 bug that causes charactersHandler to be called
twice.
    if (ent)
        ctxt->replaceEntities = (ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE)
|| (ent->etype != XML_INTERNAL_GENERAL_ENTITY);

Unfortunately I don't know enough about the hack to understand why it's
necessary.  I pulled it over from KDOM back in the day.  WildFox might remember
more.

Removing the hack causes other issues.  Something about trying to set the
encoding before there is any content.  That might have to do with a separate
hack that I added earlier this year:

    // Hack around libxml2's lack of encoding overide support by manually
    // resetting the encoding to UTF-16 before every chunk.  Otherwise libxml
    // will detect <?xml version="1.0" encoding="<encoding name>"?> blocks 
    // and switch encodings, causing the parse to fail.
    const DeprecatedChar BOM(0xFEFF);
    const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char
*>(&BOM);
    xmlSwitchEncoding(m_context, BOMHighByte == 0xFF ?
XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);

Still investigating.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list