WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
Bug 29540
[Qt] Problem with QWebElement toInnerXml() and toOuterXml() if HTML source contains closed tags
https://bugs.webkit.org/show_bug.cgi?id=29540
Summary
[Qt] Problem with QWebElement toInnerXml() and toOuterXml() if HTML source co...
Tor Arne Vestbø
Reported
2009-09-21 04:58:09 PDT
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>
Attachments
Add attachment
proposed patch, testcase, etc.
Kenneth Rohde Christiansen
Comment 1
2009-10-05 05:12:11 PDT
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?
Tor Arne Vestbø
Comment 2
2009-10-05 05:19:09 PDT
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>
Jędrzej Nowacki
Comment 3
2009-10-05 07:58:37 PDT
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.
Tor Arne Vestbø
Comment 4
2009-10-06 03:51:47 PDT
Can't reproduce this in trunk
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug