changeset 13061:6332531e14a7

[gaim-migrate @ 15423] Strip markup from Bonjour available and away messages. iChat doesn't seem to support it. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 28 Jan 2006 22:47:28 +0000
parents cb66695da326
children 1ef760c65174
files src/protocols/bonjour/bonjour.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/bonjour/bonjour.c	Sat Jan 28 22:40:40 2006 +0000
+++ b/src/protocols/bonjour/bonjour.c	Sat Jan 28 22:47:28 2006 +0000
@@ -29,10 +29,12 @@
 #endif
 
 #include "internal.h"
+
 #include "account.h"
 #include "accountopt.h"
+#include "debug.h"
+#include "util.h"
 #include "version.h"
-#include "debug.h"
 
 #include "bonjour.h"
 #include "dns_sd.h"
@@ -42,7 +44,9 @@
 /*
  * TODO: Should implement an add_buddy callback that removes the buddy
  *       from the local list.  Bonjour manages buddies for you, and
- *       adding someone locally by hand is stupid.
+ *       adding someone locally by hand is stupid.  Or, maybe even better,
+ *       if a PRPL does not have an add_buddy callback then do not allow
+ *       users to add buddies.
  */
 
 static char *default_firstname;
@@ -204,6 +208,7 @@
 	int primitive;
 	GaimPresence *presence;
 	const char *message, *bonjour_status;
+	gchar *stripped;
 
 	gc = gaim_account_get_connection(account);
 	bd = gc->proto_data;
@@ -215,6 +220,7 @@
 	message = gaim_status_get_attr_string(status, "message");
 	if (message == NULL)
 		message = "";
+	stripped = gaim_markup_strip_html(message);
 
 	/*
 	 * The three possible status for Bonjour are
@@ -230,7 +236,8 @@
 	else
 		bonjour_status = "dnd";
 
-	bonjour_dns_sd_send_status(bd->dns_sd_data, bonjour_status, message);
+	bonjour_dns_sd_send_status(bd->dns_sd_data, bonjour_status, stripped);
+	g_free(stripped);
 }
 
 static GList *