From 8d3e463fa60d91ee0876c199bd3d0810e8074821 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Mon, 15 Feb 2021 07:57:25 -0500 Subject: [PATCH] Use plaintext for Windows notifications --- src/notifications/ManagerWin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/notifications/ManagerWin.cpp b/src/notifications/ManagerWin.cpp index 5a1a867c..2ddb48cc 100644 --- a/src/notifications/ManagerWin.cpp +++ b/src/notifications/ManagerWin.cpp @@ -5,6 +5,8 @@ #include "notifications/Manager.h" #include "wintoastlib.h" +#include + #include "Cache.h" #include "EventAccessors.h" #include "MatrixClient.h" @@ -54,7 +56,7 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if cache::displayName(QString::fromStdString(notification.room_id), QString::fromStdString(mtx::accessors::sender(notification.event))); const auto text = utils::event_body(notification.event); - const auto formattedText = cmark_markdown_to_html(text.toStdString().c_str(), text.length(), CMARK_OPT_UNSAFE); + const auto formattedText = QTextDocumentFragment::fromHtml(utils::markdownToHtml(text)).toPlainText(); if (!isInitialized) init();