diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-12-04 20:32:29 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-12-04 20:32:29 +0100 |
commit | b4afeada58dbf2695a8dd4cac675a8d6c06ad251 (patch) | |
tree | 2cadf2098520d621a1b10ccc2314bb16a6b1cc31 /src/timeline | |
parent | Merge pull request #1628 from Nheko-Reborn/profile-arg (diff) | |
download | nheko-b4afeada58dbf2695a8dd4cac675a8d6c06ad251.tar.xz |
Fix urls in widgets being double encoded
See https://bugreports.qt.io/browse/QTBUG-110446
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 96fc5aca..a49dde3c 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -3282,7 +3282,9 @@ TimelineModel::widgetLinks() const // compat with some widgets, i.e. FOSDEM url.replace("$theme", theme); - url = QUrl::toPercentEncoding(url, "/:@?#&=%"); + // See https://bugreports.qt.io/browse/QTBUG-110446 + // We want to make sure that urls are encoded, even if the source is untrustworthy. + url = QUrl(url).toEncoded(); list.push_back( QLatin1String("<a href='%1'>%2</a>") |