kdecore: do not prettify the URL in KUrl::pathOrUrl()

here is how to make browsers barf - check the tooltip and where the browser
thinks the URL points to:
https://ibb.co/cyhwppK

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-06-24 23:13:38 +03:00
parent ef02376c35
commit 13fdc7b7cd

View file

@ -627,17 +627,14 @@ QString KUrl::pathOrUrl(AdjustPathOption trailing) const
if (isLocalFile() && !hasFragment() && !hasQuery()) {
return toLocalFile(trailing);
}
return prettyUrl(trailing);
return url(trailing);
}
// used for text/uri-list in the mime data. don't fold this into populateMimeData, it's also needed
// by other code like konqdrag
QString KUrl::toMimeDataString() const
{
if (isLocalFile()) {
return url();
}
if (hasPass()) {
if (hasPass() && !isLocalFile()) {
KUrl safeUrl(*this);
safeUrl.setPassword(QString());
return safeUrl.url();