Don't escape notification title text
Notifications don't support markup in title text, so escaping it causes unintended HTML entities like & to show up instead of the actual text.
This commit is contained in:
parent
8dae6772e0
commit
26a8ca7fe9
1 changed files with 3 additions and 2 deletions
|
@ -88,15 +88,16 @@ void Notification::createKNotification(const NetworkPacket& np)
|
|||
}
|
||||
|
||||
QString escapedTitle = m_title.toHtmlEscaped();
|
||||
// notification title text does not have markup, but in some cases below it is used in body text so we escape it
|
||||
QString escapedText = m_text.toHtmlEscaped();
|
||||
QString escapedTicker = m_ticker.toHtmlEscaped();
|
||||
|
||||
if (NotificationServerInfo::instance().supportedHints().testFlag(NotificationServerInfo::X_KDE_DISPLAY_APPNAME)) {
|
||||
m_notification->setTitle(escapedTitle);
|
||||
m_notification->setTitle(m_title);
|
||||
m_notification->setText(escapedText);
|
||||
m_notification->setHint(QStringLiteral("x-kde-display-appname"), m_appName.toHtmlEscaped());
|
||||
} else {
|
||||
m_notification->setTitle(m_appName.toHtmlEscaped());
|
||||
m_notification->setTitle(m_appName);
|
||||
|
||||
if (m_title.isEmpty() && m_text.isEmpty()) {
|
||||
m_notification->setText(escapedTicker);
|
||||
|
|
Loading…
Reference in a new issue