summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/protocolhandler.cpp2
-rw-r--r--src/webtab/webview.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/webtab/protocolhandler.cpp b/src/webtab/protocolhandler.cpp
index 2d5a36aa..4cf61be5 100644
--- a/src/webtab/protocolhandler.cpp
+++ b/src/webtab/protocolhandler.cpp
@@ -125,7 +125,7 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
// 11 is length of 'javascript:'
// fromPercentEncoding() is used to decode all the % encoded
// characters to normal, so that it is treated as valid javascript
- scriptSource = QUrl::fromPercentEncoding(_url.url().mid(11).toAscii());
+ scriptSource = QUrl::fromPercentEncoding(_url.url().mid(11).toUtf8());
if (scriptSource.isEmpty())
return false;
}
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index ac46e9c4..5a4a597b 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -141,6 +141,7 @@ void WebView::load(const QNetworkRequest &req, QNetworkAccessManager::Operation
{
QNetworkRequest request = req;
const QUrl &reqUrl = request.url();
+
if (reqUrl.host() == url().host())
{
request.setRawHeader(QByteArray("Referer"), url().toEncoded());