mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Fix urls in widgets being double encoded
See https://bugreports.qt.io/browse/QTBUG-110446
This commit is contained in:
parent
ed6abe989f
commit
b4afeada58
1 changed files with 3 additions and 1 deletions
|
@ -3282,7 +3282,9 @@ TimelineModel::widgetLinks() const
|
||||||
// compat with some widgets, i.e. FOSDEM
|
// compat with some widgets, i.e. FOSDEM
|
||||||
url.replace("$theme", theme);
|
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(
|
list.push_back(
|
||||||
QLatin1String("<a href='%1'>%2</a>")
|
QLatin1String("<a href='%1'>%2</a>")
|
||||||
|
|
Loading…
Reference in a new issue