mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Retain query and fragment when loading a local file via relative URL.
This commit is contained in:
@@ -60,7 +60,13 @@ public:
|
||||
tmp.close();
|
||||
mainFrame()->load(tmp.fileName());
|
||||
} else {
|
||||
mainFrame()->load(url);
|
||||
QUrl absurl = url;
|
||||
if (url.isRelative()) {
|
||||
absurl = QUrl::fromLocalFile(QFileInfo(url.toLocalFile()).absoluteFilePath());
|
||||
absurl.setQueryItems(url.queryItems());
|
||||
absurl.setFragment(url.fragment());
|
||||
}
|
||||
mainFrame()->load(absurl);
|
||||
}
|
||||
}
|
||||
~PageRunner() {
|
||||
|
||||
Reference in New Issue
Block a user