35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
From d95c4b850b03776c95efd04baad8c92864c42a3d Mon Sep 17 00:00:00 2001
|
|
From: Martin Klapetek <mklapetek@kde.org>
|
|
Date: Mon, 27 Apr 2015 14:33:42 +0200
|
|
Subject: [PATCH 03/12] [notifications] Replace ' with ' as ' is not
|
|
supported by StyledText
|
|
|
|
QtQuick's Text with StyledFormat supports only html3.2 subset of stuff.
|
|
' is html4 and as such gets removed altogther, which is obviously
|
|
unwanted.
|
|
|
|
Reviewed-by: Kai Uwe Broulik
|
|
BUG: 346710
|
|
FIXED-IN: 5.3.1
|
|
---
|
|
dataengines/notifications/notificationsengine.cpp | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/dataengines/notifications/notificationsengine.cpp b/dataengines/notifications/notificationsengine.cpp
|
|
index 6a417294c65c71960f1c1ba022e8c2976a0b9464..37a11dd1f70bc7692112be1d51918a39682969d9 100644
|
|
--- a/dataengines/notifications/notificationsengine.cpp
|
|
+++ b/dataengines/notifications/notificationsengine.cpp
|
|
@@ -232,6 +232,9 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
|
|
// text where it finds a stray ampersand.
|
|
// Only &{apos, quot, gt, lt, amp}; as well as { character references will be allowed
|
|
bodyFinal.replace(QRegularExpression("&(?!(?:apos|quot|[gl]t|amp);|#)"), QLatin1String("&"));
|
|
+ // The Text.StyledText format handles only html3.2 stuff and ' is html4 stuff
|
|
+ // so we need to replace it here otherwise it will not render at all.
|
|
+ bodyFinal.replace(QLatin1String("'"), QChar('\''));
|
|
|
|
Plasma::DataEngine::Data notificationData;
|
|
notificationData.insert("id", QString::number(id));
|
|
--
|
|
2.3.5
|
|
|