mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
kdirshare: do not percentage-encode the file links
if only there was a way to tell browsers: Hey, browser! Don't decode the URL - you don't know where it points to! for reference: https://ibb.co/cyhwppK Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
114265bd60
commit
1b116dbc2e
1 changed files with 3 additions and 1 deletions
|
@ -170,7 +170,9 @@ static QByteArray contentForFile(const QString &basedir, const QFileInfo &filein
|
|||
}
|
||||
|
||||
data.append(" <td><a href=\"");
|
||||
data.append(QUrl::toPercentEncoding(cleanpath));
|
||||
// NOTE: browsers produce bogus URLs for mixed (non-percentage and percentage-encoded) paths,
|
||||
// also browsers decode percentage URLs and pass it back which for local files may be invalid
|
||||
data.append(cleanpath.toUtf8());
|
||||
data.append("\">");
|
||||
data.append(fileinfo.fileName().toUtf8());
|
||||
data.append("</a></td>\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue