[Fix] Url with only query is valid too

mailto:?subject=foo should be treated as valid url too

Closes #1112
remotes/origin/falkon
nowrep 12 years ago
parent ffd560142b
commit 7e088d0f1d
  1. 2
      src/lib/webview/webview.cpp

@ -240,7 +240,7 @@ QWebElement WebView::activeElement() const
bool WebView::isUrlValid(const QUrl &url)
{
// Valid url must have scheme and actually contains something (therefore scheme:// is invalid)
return url.isValid() && !url.scheme().isEmpty() && (!url.host().isEmpty() || !url.path().isEmpty());
return url.isValid() && !url.scheme().isEmpty() && (!url.host().isEmpty() || !url.path().isEmpty() || url.hasQuery());
}
QUrl WebView::guessUrlFromString(const QString &string)

Loading…
Cancel
Save