Summary: | [Qt] QWebFrame.setHtml() doesn't resolve relative files references in HTML | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tor Arne Vestbø <vestbo> |
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | cmarcelo, jenya.brodskaia, kent.hansen, menard, tonikitoo |
Priority: | P2 | Keywords: | Qt, QtTriaged |
Version: | 528+ (Nightly build) | ||
Hardware: | Other | ||
OS: | OS X 10.5 |
Description
Tor Arne Vestbø
2009-09-21 08:01:22 PDT
Reproduced with r55986 on Linux. I can't even get this to work when using an absolute base URL. The test case would help a lot. The test case is missing, so I created this one according to the description above: QWebView *myView = new QWebView(); QWebPage *myPage = myView->page(); QString html = "<html>RED APPLE <img src=\"apple.gif\"/></html>"; QUrl url = QUrl::fromLocalFile("/home/jb_test/myBaseDir/"); // Works. Valid file:/// url is constructed QUrl url1("file:///home/jb_test/myBaseDir/"); // Works. QUrl url2 = QUrl::fromLocalFile("myBaseDir/"); // Does not work. myPage->mainFrame()->setHtml(html, url); //myPage->mainFrame()->setHtml(html, url1); //myPage->mainFrame()->setHtml(html, url2); myView->show(); The issue is reproducible, but it is not a bug. QUrl::fromLocalFile("myBaseDir/") does not get resolved to the valid url, but if you provide a full file path - it does. See http://doc.trolltech.com/4.7/qurl.html. The documentation does not suggest that relative path may be used in QUrl::fromLocalFile. === Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines. |