<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29461</bug_id>
          
          <creation_ts>2009-09-18 08:12:44 -0700</creation_ts>
          <short_desc>[Qt] QWebView-&gt;setHtml doesn&apos;t speak XHTML</short_desc>
          <delta_ts>2010-07-29 08:19:57 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>31115</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tor Arne Vestbø">vestbo</reporter>
          <assigned_to name="QtWebKit Unassigned">webkit-qt-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>jedrzej.nowacki</cc>
    
    <cc>jturcotte</cc>
    
    <cc>menard</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>148169</commentid>
    <comment_count>0</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-09-18 08:12:44 -0700</bug_when>
    <thetext>This bug report originated from issue QTBUG-2787
&lt;http://bugreports.qt.nokia.com/browse/QTBUG-2787&gt;

--- Description ---

If one does:

    QString html=&quot;XHTML content&quot;;
    QWebView-&gt;setHtml( html );

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

QWebView-&gt;setContent( html.toLocal8Bit(), &quot;application/xhtml+xml&quot; ) 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 (&quot;&lt;?xml&quot; and the doctype are good hints).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166483</commentid>
    <comment_count>1</comment_count>
    <who name="Jędrzej Nowacki">jedrzej.nowacki</who>
    <bug_when>2009-11-25 09:17:29 -0800</bug_when>
    <thetext>*** Bug 29457 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180728</commentid>
    <comment_count>2</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2010-01-14 08:12:08 -0800</bug_when>
    <thetext>Lowering to minor since workarounds are available.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257689</commentid>
    <comment_count>3</comment_count>
    <who name="Alexis Menard (darktears)">menard</who>
    <bug_when>2010-07-29 08:17:29 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 31115 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257692</commentid>
    <comment_count>4</comment_count>
    <who name="Alexis Menard (darktears)">menard</who>
    <bug_when>2010-07-29 08:19:57 -0700</bug_when>
    <thetext>The documentation says better what to use now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>