From 8215c7bcde3e1fcb3635059c408b4b97e42f2141 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 16:16:36 +0200 Subject: feat(notifications): render bodies as Markdown Balloon and drawer bodies switch from RichText to Qt's MarkdownText (CommonMark plus GitHub extensions). Raw HTML still goes through Qt's HTML importer, so body-markup senders keep working. Markdown images fetch their destination the same way an does, which the existing sanitize filter would miss since it only inspects tags. sanitize now escapes every "![" so the syntax renders as literal text, local or remote; parsing CommonMark destinations and reference definitions to allow local ones is not worth the grammar. Verified in the shell log: before the filter reached the running shell, a test body fetched https://example.org/a.png; after, a second one did not. Co-Authored-By: Claude Opus 5.5 --- notifications/NotificationBalloon.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'notifications/NotificationBalloon.qml') diff --git a/notifications/NotificationBalloon.qml b/notifications/NotificationBalloon.qml index 49ec0b4..b01a848 100644 --- a/notifications/NotificationBalloon.qml +++ b/notifications/NotificationBalloon.qml @@ -124,7 +124,7 @@ Rectangle { width: parent.width visible: text !== "" text: Notify.sanitize(b.notification.body) - textFormat: Text.RichText + textFormat: Text.MarkdownText wrapMode: Text.WordWrap maximumLineCount: 3 elide: Text.ElideRight -- cgit v1.2.3