WebUI: Only prepend scheme when it is not present. Closes #8057.

This commit is contained in:
Chocobo1 2017-12-18 14:12:31 +08:00
parent 53c33317f9
commit fb6bdbefd5
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -90,7 +90,9 @@ namespace
{
inline QUrl urlFromHostHeader(const QString &hostHeader)
{
return QUrl(QLatin1String("http://") + hostHeader);
if (!hostHeader.contains(QLatin1String("://")))
return QUrl(QLatin1String("http://") + hostHeader);
return hostHeader;
}
}