diff src/protocols/silc/ops.c @ 10732:c4cb90065e1d

[gaim-migrate @ 12334] "gaim_escape_html (according to Ethan) predates g_markup_escape_text. Current code in Gaim uses both functions. This patch removes gaim_escape_html from the API and replaces all calls in the Gaim tree with g_markup_escape_text. I included a ChangeLog.API note. As far as I can tell, this still works perfectly. This is obviously intended for HEAD only, as it removes a public function." --rlaager this was discussed extensively this morning committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 26 Mar 2005 02:43:49 +0000
parents 0f7452b1f777
children 94cc67130789
line wrap: on
line diff
--- a/src/protocols/silc/ops.c	Sat Mar 26 01:20:31 2005 +0000
+++ b/src/protocols/silc/ops.c	Sat Mar 26 02:43:49 2005 +0000
@@ -90,7 +90,7 @@
 		if (!msg)
 			return;
 
-		tmp = gaim_escape_html(msg);
+		tmp = g_markup_escape_text(msg, -1);
 		/* Send to Gaim */
 		serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)),
 				 sender->nickname ?
@@ -117,7 +117,7 @@
 	}
 
 	if (flags & SILC_MESSAGE_FLAG_UTF8) {
-		tmp = gaim_escape_html((const char *)message);
+		tmp = g_markup_escape_text((const char *)message, -1);
 		/* Send to Gaim */
 		serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)),
 				 sender->nickname ?
@@ -169,7 +169,7 @@
 		if (!msg)
 			return;
 
-		tmp = gaim_escape_html(msg);
+		tmp = g_markup_escape_text(msg, -1);
 		/* Send to Gaim */
 		serv_got_im(gc, sender->nickname ?
 			    sender->nickname : "<unknown>",
@@ -195,7 +195,7 @@
 	}
 
 	if (flags & SILC_MESSAGE_FLAG_UTF8) {
-		tmp = gaim_escape_html((const char *)message);
+		tmp = g_markup_escape_text((const char *)message, -1);
 		/* Send to Gaim */
 		serv_got_im(gc, sender->nickname ?
 			    sender->nickname : "<unknown>",
@@ -331,7 +331,7 @@
 			if (!tmp)
 				break;
 
-			esc = gaim_escape_html(tmp);
+			esc = g_markup_escape_text(tmp, -1);
 			tmp2 = gaim_markup_linkify(esc);
 			g_free(esc);
 
@@ -961,16 +961,16 @@
 			user_modes = va_arg(vp, SilcBuffer);
 
 			s = g_string_new("");
-			tmp2 = gaim_escape_html(client_entry->nickname);
+			tmp2 = g_markup_escape_text(client_entry->nickname, -1);
 			g_string_append_printf(s, "<b>%s:</b> %s", _("Nickname"), tmp2);
 			g_free(tmp2);
 			if (client_entry->realname) {
-				tmp2 = gaim_escape_html(client_entry->realname);
+				tmp2 = g_markup_escape_text(client_entry->realname, -1);
 				g_string_append_printf(s, "<br><b>%s:</b> %s", _("Realname"), tmp2);
 				g_free(tmp2);
 			}
 			if (client_entry->username) {
-				tmp2 = gaim_escape_html(client_entry->username);
+				tmp2 = g_markup_escape_text(client_entry->username, -1);
 				if (client_entry->hostname)
 					g_string_append_printf(s, "<br><b>%s:</b> %s@%s", _("Username"), tmp2, client_entry->hostname);
 				else
@@ -993,7 +993,7 @@
 			}
 
 			if (statusstr) {
-				tmp2 = gaim_escape_html(statusstr);
+				tmp2 = g_markup_escape_text(statusstr, -1);
 				g_string_append_printf(s, "<br><b>%s:</b> %s", _("Status Text"), tmp2);
 				g_free(statusstr);
 				g_free(tmp2);
@@ -1053,7 +1053,7 @@
 						silc_free(m);
 
 					}
-					tmp2 = gaim_escape_html(tmp);
+					tmp2 = g_markup_escape_text(tmp, -1);
 					g_string_append_printf(s, "%s", tmp2);
 					g_free(tmp2);
 					silc_free(umodes);
@@ -1112,16 +1112,16 @@
 				break;
 
 			s = g_string_new("");
-			tmp = gaim_escape_html(nickname);
+			tmp = g_markup_escape_text(nickname, -1);
 			g_string_append_printf(s, "<b>%s:</b> %s", _("Nickname"), tmp);
 			g_free(tmp);
 			if (realname) {
-				tmp = gaim_escape_html(realname);
+				tmp = g_markup_escape_text(realname, -1);
 				g_string_append_printf(s, "<br><b>%s:</b> %s", _("Realname"), tmp);
 				g_free(tmp);
 			}
 			if (username) {
-				tmp = gaim_escape_html(username);
+				tmp = g_markup_escape_text(username, -1);
 				if (client_entry && client_entry->hostname)
 					g_string_append_printf(s, "<br><b>%s:</b> %s@%s", _("Username"), tmp, client_entry->hostname);
 				else