diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 96fc5aca774b3d62da90894e5dfe80b73de6c803..a49dde3cb5e62b23b8c7e6af737fad10f9e1294a 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>")