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. <tag/>) as if they include data normaly following them . For example: -------------------- source html: <tag><childtag/>some text</tag> result toInnerHtml() for <tag> element should be: <childtag/>some text or '<childtag></childtag>some text but it was: <childtag>some text</childtag> result toOuterHtml() for <tag> element should be: <tag><childtag/>some text</tag> or '<tag><childtag></childtag>some text</tag> but it was: <tag><childtag>some text</childtag></tag>
I don't really see the point. This is how they are treated internally, and the functions do start with "to", indicating some kind of conversion. Would be fun to see what jQuery returns?
Both Safari and Firefox has this behavior: data:text/html,<p id="para"><br/>foo</p> document.getElementById("para") <p id="para"> document.getElementById("para").innerHTML <br>foo document.getElementById("para").outerHTML <p id="para"><br>foo</p>
The output is broken, it is true but: 1. HTML doesn't support closed tags, XHTML does. 2. nobody care, I'm pretty sure it is my request, closed in Hooligan and (badly?) migrated to Jira and than to bugzilla.
Can't reproduce this in trunk