changeset 9589:f4654d3b7b8d

[gaim-migrate @ 10432] Patch by our dedicated crazy patch writer Stu Tomlinson. This HTML-escapes whois information. It also apparently fixes a bug in the tracker. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Sat, 24 Jul 2004 18:17:47 +0000
parents bb722a784568
children a7b3a1ece65e
files src/protocols/irc/msgs.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c	Sat Jul 24 15:31:15 2004 +0000
+++ b/src/protocols/irc/msgs.c	Sat Jul 24 18:17:47 2004 +0000
@@ -184,14 +184,18 @@
 			       irc->whois.ircop ? _(" <i>(ircop)</i>") : "",
 			       irc->whois.identified ? _(" <i>(identified)</i>") : "");
 	if (irc->whois.away) {
-		g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Away"), irc->whois.away);
+		char *tmp = g_markup_escape_text(irc->whois.away, strlen(irc->whois.away));
 		g_free(irc->whois.away);
+		g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Away"), tmp);
+		g_free(tmp);
 	}
 	if (irc->whois.userhost) {
+		char *tmp = g_markup_escape_text(irc->whois.name, strlen(irc->whois.name));
+		g_free(irc->whois.name);
 		g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Username"), irc->whois.userhost);
-		g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Realname"), irc->whois.name);
+		g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Realname"), tmp);
 		g_free(irc->whois.userhost);
-		g_free(irc->whois.name);
+		g_free(tmp);
 	}
 	if (irc->whois.server) {
 		g_string_append_printf(info, _("<b>%s:</b> %s"), _("Server"), irc->whois.server);