fix google favicon download over https

This commit is contained in:
thez3ro 2017-07-02 11:39:52 +02:00 committed by Janek Bevendorff
parent bb50db40d2
commit 9ceadac299
2 changed files with 4 additions and 4 deletions

View File

@ -802,13 +802,13 @@ QString Entry::resolveUrl(const QString& url) const
}
QUrl uurl = QUrl(newurl);
if(uurl.scheme() == "cmd") {
// URL is a cmd, hopefully the second argument it's an URL
if (uurl.scheme() == "cmd") {
// URL is a cmd, hopefully the second argument is an URL
QStringList cmd = newurl.split(" ");
if (cmd.size() > 1) {
return resolveUrl(cmd[1].remove("'").remove("\""));
}
} else if(uurl.scheme() == "http" || uurl.scheme() == "https") {
} else if (uurl.scheme() == "http" || uurl.scheme() == "https") {
// URL is nice
return uurl.url();
}

View File

@ -242,7 +242,7 @@ void EditWidgetIcons::fetchFaviconFromGoogle(const QString& domain)
if (config()->get("security/IconDownloadFallbackToGoogle", false).toBool() && m_fallbackToGoogle) {
resetFaviconDownload();
m_fallbackToGoogle = false;
fetchFavicon(QUrl("http://www.google.com/s2/favicons?domain=" + domain));
fetchFavicon(QUrl("https://www.google.com/s2/favicons?domain=" + domain));
} else {
resetFaviconDownload();
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon."));