summary refs log tree commit diff
path: root/src/notifications/ManagerWin.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-02-15 07:57:25 -0500
committerNicolas Werner <nicolas.werner@hotmail.de>2021-03-17 19:17:13 +0100
commit8d3e463fa60d91ee0876c199bd3d0810e8074821 (patch)
tree5a9ae540a0aceee28c823409df6df4bf0fdb9ada /src/notifications/ManagerWin.cpp
parentOnly pass formatted text if it is supported (Linux) (diff)
downloadnheko-8d3e463fa60d91ee0876c199bd3d0810e8074821.tar.xz
Use plaintext for Windows notifications
Diffstat (limited to 'src/notifications/ManagerWin.cpp')
-rw-r--r--src/notifications/ManagerWin.cpp4
1 files changed, 3 insertions, 1 deletions
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 <QTextDocumentFragment>
+
 #include "Cache.h"
 #include "EventAccessors.h"
 #include "MatrixClient.h"
@@ -54,7 +56,7 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif
           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();