Mercurial > pidgin
diff src/util.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 | 783ca1f1ebdb |
children | 8002e95c0809 |
line wrap: on
line diff
--- a/src/util.c Sat Mar 26 01:20:31 2005 +0000 +++ b/src/util.c Sat Mar 26 02:43:49 2005 +0000 @@ -1673,39 +1673,6 @@ } char * -gaim_escape_html(const char *html) { - const char *c = html; - GString *ret; - - if (html == NULL) - return NULL; - - ret = g_string_new(""); - - while (*c) { - switch (*c) { - case '&': - ret = g_string_append(ret, "&"); - break; - case '<': - ret = g_string_append(ret, "<"); - break; - case '>': - ret = g_string_append(ret, ">"); - break; - case '"': - ret = g_string_append(ret, """); - break; - default: - ret = g_string_append_c(ret, *c); - } - c++; - } - - return g_string_free(ret, FALSE); -} - -char * gaim_unescape_html(const char *html) { char *unescaped = NULL;