diff --git a/src/panel/widgets/notifications/single-notification.cpp b/src/panel/widgets/notifications/single-notification.cpp index 034a1e16..0fe4ef71 100644 --- a/src/panel/widgets/notifications/single-notification.cpp +++ b/src/panel/widgets/notifications/single-notification.cpp @@ -2,6 +2,7 @@ #include "daemon.hpp" #include +#include #include #include @@ -111,11 +112,12 @@ WfSingleNotification::WfSingleNotification(const Notification & notification) text.set_line_wrap_mode(Pango::WRAP_CHAR); if (notification.body.empty()) { - text.set_markup(notification.summary); + text.set_markup(Glib::Markup::escape_text(notification.summary)); } else { // NOTE: that is not a really right way to implement FDN markup feature, but the easiest one. - text.set_markup("" + notification.summary + "" + "\n" + notification.body); + text.set_markup("" + Glib::Markup::escape_text( + notification.summary) + "" + "\n" + Glib::Markup::escape_text(notification.body)); } content.pack_start(text); diff --git a/src/panel/widgets/tray/item.cpp b/src/panel/widgets/tray/item.cpp index 98c5a1d3..dfc0c84f 100644 --- a/src/panel/widgets/tray/item.cpp +++ b/src/panel/widgets/tray/item.cpp @@ -2,6 +2,8 @@ #include +#include + #include #include @@ -185,10 +187,11 @@ void StatusNotifierItem::setup_tooltip() get_item_property>("ToolTip"); auto tooltip_label_text = !tooltip_text.empty() && !tooltip_title.empty() ? - "" + tooltip_title + ": " + tooltip_text : - !tooltip_title.empty() ? tooltip_title : - !tooltip_text.empty() ? tooltip_text : - get_item_property("Title"); + "" + Glib::Markup::escape_text(tooltip_title) + ": " + + Glib::Markup::escape_text(tooltip_text) : + !tooltip_title.empty() ? Glib::Markup::escape_text(tooltip_title) : + !tooltip_text.empty() ? Glib::Markup::escape_text(tooltip_text) : + Glib::Markup::escape_text(get_item_property("Title")); const auto pixbuf = extract_pixbuf(std::move(tooltip_icon_data));