[Webkit-unassigned] [Bug 29466] New: [Qt] [Webkit] Using backslash escaping breaks links.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 18 08:24:20 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29466
Summary: [Qt] [Webkit] Using backslash escaping breaks links.
Product: WebKit
Version: 528+ (Nightly build)
Platform: Other
OS/Version: Mac OS X 10.5
Status: NEW
Keywords: Qt
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: vestbo at webkit.org
This bug report originated from issue QTBUG-2479
<http://bugreports.qt.nokia.com/browse/QTBUG-2479>
--- Description ---
When using the following link to a local HMTL file and clicking a link to
another local file, the new page doesn’t load.
For example: “c:\\pages\\index.html” is written in the address bar in the Qt
browser demo. The page loads but when a link inside is pressed; the new page is
not loaded properly.
With “c:/pages/index.html” everything works perfect.
On Tue Jul 22 13:56:37 2008 qtsupport wrote:
- How to reproduce:
1. Start the demo browser in Qt 4.4
2. Copy the files from task 220074 to a directory(i.e. c:/pages)
3. Load the page typing “c:\\pages\\index.html” in the address bar.
4. Click on the link
- Expected result:
New page should load.
- Actual result:
A blank page
Contents:
Or use this code(four files):
Testlinkclicked.h
class testLinkClicked : public QObject
{
Q_OBJECT
public:
testLinkClicked() {};
testLinkClicked( QWebView* w ){
connect( w, SIGNAL( linkClicked ( const QUrl & ) ),
this, SLOT( showLinkClicked() ) );
}
public slots:
void showLinkClicked(){
qDebug("Link has been clicked!");
}
};
qtest.cpp
int main(int argc, char **argv){
QApplication qapp(argc,argv);
QWebView* view = new QWebView();
/*
* uncomment these lines to see if link is clicked
*/
// view->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
// testLinkClicked test( view );
/*
* works: absolute path with forward slashes
*/
QString l_urlString = QDir::currentPath() + "/index.html";
/*
* does not work: the slash before the html file is a backslash!
*
* effect: link acts as being clicked (changes color) but index.html stays the
current page
*/
// QString l_urlString = QDir::currentPath() + "\\index.html";
/*
* does not work: all slashes are backslash
*
* effect: blank page is shown
*/
// QString l_urlString = QDir::currentPath().replace('/', "\\") +
"\\index.html";
qDebug( "%s", qPrintable( l_urlString ) );
QUrl l_url( l_urlString );
view->setUrl( l_url );
view->show();
qapp.exec();
}
Index.html
<html><head><title>This is page 1</title></head><body><h1>this is page 1
(index.html)</h1>Click here to go to <a
href="page2.html">page2</a></body></html>
Page2.html
<html><head><title>This is page 2</title></head><body><h1>This is page
2</h1></body></html>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list