summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-08-19 15:54:07 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-08-20 18:15:51 +0200
commitabd17e1583e8e13b1a46d599fb695c1189550226 (patch)
treea02498eab55e8aca32f786ddbda6a9e4dff67380 /lib
parent0c109945af09212f8fc5806831ffe7b1f827804d (diff)
Let the application sanitize the URL.
Do like the QtQuick example and let the Widgets example use urlFromUserInput to add a missing http scheme instead of letting QtWebEngine do it. This is the same behavior as QtWebKit does. Change-Id: Iac1570523253126e059afb00c3a2ff844e177ff1 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/web_contents_adapter.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/web_contents_adapter.cpp b/lib/web_contents_adapter.cpp
index de18e38a0..8302c9199 100644
--- a/lib/web_contents_adapter.cpp
+++ b/lib/web_contents_adapter.cpp
@@ -120,8 +120,6 @@ void WebContentsAdapter::load(const QUrl &url)
{
QString urlString = url.toString();
GURL gurl(urlString.toStdString());
- if (!gurl.has_scheme())
- gurl = GURL(std::string("http://") + urlString.toStdString());
content::NavigationController::LoadURLParams params(gurl);
params.transition_type = content::PageTransitionFromInt(content::PAGE_TRANSITION_TYPED | content::PAGE_TRANSITION_FROM_ADDRESS_BAR);