changeset 12669:879f90dbd21f

[gaim-migrate @ 15012] SF Patch #1392411 from Sadrul "I started using Gaim or IRC, and it seems it uses &quot;, &amp; for characters like ", & in the away message. This patch strips html-stuff from an away message for IRC before setting it. This makes the said characters appear correctly in /whois." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 29 Dec 2005 01:30:08 +0000
parents 57462d6542ea
children f57ff720957f
files src/protocols/irc/cmds.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/cmds.c	Thu Dec 29 00:44:11 2005 +0000
+++ b/src/protocols/irc/cmds.c	Thu Dec 29 01:30:08 2005 +0000
@@ -52,14 +52,11 @@
 
 int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
 {
-	char *buf, *message, *cur;
+	char *buf, *message;
 
 	if (args[0] && strcmp(cmd, "back")) {
-		message = strdup(args[0]);
-		for (cur = message; *cur; cur++) {
-			if (*cur == '\n')
-				*cur = ' ';
-		}
+		message = gaim_markup_strip_html(args[0]);
+		gaim_util_chrreplace(message, '\n', ' ');
 		buf = irc_format(irc, "v:", "AWAY", message);
 		g_free(message);
 	} else {