changeset 5737:72ced7411599

[gaim-migrate @ 6161] We now escape text sent across Trepia. This was causing gaim to crash. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 04 Jun 2003 07:08:13 +0000
parents f5063f283e41
children ec032cb2f9ec
files src/protocols/trepia/trepia.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/trepia/trepia.c	Wed Jun 04 06:37:16 2003 +0000
+++ b/src/protocols/trepia/trepia.c	Wed Jun 04 07:08:13 2003 +0000
@@ -802,14 +802,19 @@
 			int len, int flags)
 {
 	TrepiaSession *session = gc->proto_data;
+	char *escaped_msg;
 	char *buffer;
 
+	escaped_msg = g_markup_escape_text(message, -1);
+
 	buffer = g_strdup_printf(
 		"<F>\n"
 		"<a>%s</a>\n"
 		"<b>%s</b>\n"
 		"</F>",
-		who, message);
+		who, escaped_msg);
+
+	g_free(escaped_msg);
 
 	if (trepia_write(session->fd, buffer, strlen(buffer)) < 0) {
 		gaim_connection_error(gc, _("Write error"));