[Webkit-unassigned] [Bug 29461] New: [Qt] QWebView->setHtml doesn't speak XHTML

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 08:12:44 PDT 2009


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

           Summary: [Qt] QWebView->setHtml doesn't speak XHTML
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: vestbo at webkit.org


This bug report originated from issue QTBUG-2787
<http://bugreports.qt.nokia.com/browse/QTBUG-2787>

--- Description ---

If one does:

    QString html="XHTML content";
    QWebView->setHtml( html );

it is parsed with WebKit's HTML parser as opposed to its XHTML parser (causing
some oddities in the DOM tree because e.g. for HTML, <a id="something" /> is
just an opened tag, while for XHTML it's opening and closing a tag).

QWebView->setContent( html.toLocal8Bit(), "application/xhtml+xml" ) does the
correct thing, but is slower (and possibly less accurate), because of the
charset conversions.

setHtml() should probably set the MIME type to application/xhtml+xml instead of
text/html if it detects a proper XHTML header ("<?xml" and the doctype are good
hints).

-- 
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