<?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>29540</bug_id>
          
          <creation_ts>2009-09-21 04:58:09 -0700</creation_ts>
          <short_desc>[Qt] Problem with QWebElement toInnerXml() and toOuterXml() if HTML source contains closed tags</short_desc>
          <delta_ts>2009-10-06 03:51:47 -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>DOM</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>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>29799</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Tor Arne Vestbø">vestbo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>jedrzej.nowacki</cc>
    
    <cc>kenneth</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>148625</commentid>
    <comment_count>0</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-09-21 04:58:09 -0700</bug_when>
    <thetext>This bug report originated from Nokia internal issue QT-695

--- Description ---

QWebElement generate bad output for toInnerXml and toOuterXml methods if source HTML contains solo tags. QWebElement tread closed tags (ex. &lt;tag/&gt;) as if they include data normaly following them .

For example:
--------------------

  source html:
&lt;tag&gt;&lt;childtag/&gt;some text&lt;/tag&gt;

  result toInnerHtml() for &lt;tag&gt; element should be:
&lt;childtag/&gt;some text or &apos;&lt;childtag&gt;&lt;/childtag&gt;some text

  but it was:
&lt;childtag&gt;some text&lt;/childtag&gt;

  result toOuterHtml() for &lt;tag&gt; element should be:
&lt;tag&gt;&lt;childtag/&gt;some text&lt;/tag&gt; or &apos;&lt;tag&gt;&lt;childtag&gt;&lt;/childtag&gt;some text&lt;/tag&gt;

  but it was:
&lt;tag&gt;&lt;childtag&gt;some text&lt;/childtag&gt;&lt;/tag&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>152274</commentid>
    <comment_count>1</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-10-05 05:12:11 -0700</bug_when>
    <thetext>I don&apos;t really see the point. This is how they are treated internally, and the functions do start with &quot;to&quot;, indicating some kind of conversion.

Would be fun to see what jQuery returns?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>152275</commentid>
    <comment_count>2</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-10-05 05:19:09 -0700</bug_when>
    <thetext>Both Safari and Firefox has this behavior:

data:text/html,&lt;p id=&quot;para&quot;&gt;&lt;br/&gt;foo&lt;/p&gt;

document.getElementById(&quot;para&quot;)
&lt;p id=​&quot;para&quot;&gt;​
document.getElementById(&quot;para&quot;).innerHTML
&lt;br&gt;foo
document.getElementById(&quot;para&quot;).outerHTML
&lt;p id=&quot;para&quot;&gt;&lt;br&gt;foo&lt;/p&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>152292</commentid>
    <comment_count>3</comment_count>
    <who name="Jędrzej Nowacki">jedrzej.nowacki</who>
    <bug_when>2009-10-05 07:58:37 -0700</bug_when>
    <thetext>The output is broken, it is true but:
1. HTML doesn&apos;t support closed tags, XHTML does.
2. nobody care, I&apos;m pretty sure it is my request, closed in Hooligan and (badly?) migrated to Jira and than to bugzilla.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>152646</commentid>
    <comment_count>4</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-10-06 03:51:47 -0700</bug_when>
    <thetext>Can&apos;t reproduce this in trunk</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>