From b4afeada58dbf2695a8dd4cac675a8d6c06ad251 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 4 Dec 2023 20:32:29 +0100 Subject: [PATCH] Fix urls in widgets being double encoded See https://bugreports.qt.io/browse/QTBUG-110446 --- src/timeline/TimelineModel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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("%2")