--- kio/misc/kpac/script.cpp +++ kio/misc/kpac/script.cpp @@ -754,9 +754,16 @@ namespace KPAC } } + KUrl cleanUrl = url; + cleanUrl.setUserInfo(QString()); + if (cleanUrl.scheme().toLower() == QLatin1String("https")) { + cleanUrl.setPath(QString()); + cleanUrl.setQuery(QString()); + } + QScriptValueList args; - args << url.url(); - args << url.host(); + args << cleanUrl.url(); + args << cleanUrl.host(); QScriptValue result = func.call(QScriptValue(), args); if (result.isError()) {