summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fe-gtk/plugin-tray.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index d0196bcb..731d5857 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -180,13 +180,23 @@ fe_tray_set_balloon (const char *title, const char *text)
 		return;
 
 #ifdef USE_LIBNOTIFY
+	static int notify_text_strip_flags = STRIP_ALL;
 	NotifyNotification *notification;
 	char *notify_text, *notify_title;
 
 	if (!notify_is_initted())
+	{
 		notify_init(PACKAGE_NAME);
 
-	notify_text = strip_color (text, -1, STRIP_ALL|STRIP_ESCMARKUP);
+		GList* server_caps = notify_get_server_caps ();
+		if (g_list_find_custom (server_caps, "body-markup", (GCompareFunc)strcmp))
+		{
+			notify_text_strip_flags |= STRIP_ESCMARKUP;
+		}
+		g_list_free_full (server_caps, g_free);
+	}
+
+	notify_text = strip_color (text, -1, notify_text_strip_flags);
 	notify_title = strip_color (title, -1, STRIP_ALL);
 
 	notification = XC_NOTIFY_NEW (notify_title, notify_text, HEXCHATSHAREDIR "/icons/hicolor/scalable/apps/hexchat.svg", NULL);