aboutsummaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-29 16:16:36 +0200
committerDanilo M. <danix@danix.xyz>2026-09-29 16:16:36 +0200
commit8215c7bcde3e1fcb3635059c408b4b97e42f2141 (patch)
treee994d2690e0d6ee06b28eb0976ec570d380341b1 /desktop
parent0da34c765da9b9c831befdab659c9eb0c79c9079 (diff)
downloadquickshell-8215c7bcde3e1fcb3635059c408b4b97e42f2141.tar.gz
quickshell-8215c7bcde3e1fcb3635059c408b4b97e42f2141.zip
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 <img> 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 <noreply@anthropic.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/NotificationRow.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/NotificationRow.qml b/desktop/NotificationRow.qml
index 923cc9e..35c468b 100644
--- a/desktop/NotificationRow.qml
+++ b/desktop/NotificationRow.qml
@@ -93,7 +93,7 @@ Rectangle {
width: parent.width
visible: text !== ""
text: Notify.sanitize(row.notification.body)
- textFormat: Text.RichText
+ textFormat: Text.MarkdownText
wrapMode: Text.WordWrap
maximumLineCount: 2
elide: Text.ElideRight