Mercurial > pidgin
comparison src/gtkimhtml.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 | c8b4bf3bf9e5 |
children | 7c6b69eb82f2 |
comparison
equal
deleted
inserted
replaced
10731:783ca1f1ebdb | 10732:c4cb90065e1d |
---|---|
791 char *tmp; | 791 char *tmp; |
792 | 792 |
793 if (text == NULL) | 793 if (text == NULL) |
794 return; | 794 return; |
795 | 795 |
796 tmp = gaim_escape_html(text); | 796 tmp = g_markup_escape_text(text, -1); |
797 imhtml_paste_insert(data, tmp, TRUE); | 797 imhtml_paste_insert(data, tmp, TRUE); |
798 g_free(tmp); | 798 g_free(tmp); |
799 } | 799 } |
800 | 800 |
801 static void paste_received_cb (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data) | 801 static void paste_received_cb (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data) |
1479 case GTK_IMHTML_DRAG_TEXT: | 1479 case GTK_IMHTML_DRAG_TEXT: |
1480 if (!(*text) || !g_utf8_validate(text, -1, NULL)) { | 1480 if (!(*text) || !g_utf8_validate(text, -1, NULL)) { |
1481 gaim_debug_warning("gtkimhtml", "empty string or invalid UTF-8 in drag_rcv_cb\n"); | 1481 gaim_debug_warning("gtkimhtml", "empty string or invalid UTF-8 in drag_rcv_cb\n"); |
1482 return; | 1482 return; |
1483 } else { | 1483 } else { |
1484 char *tmp = gaim_escape_html(text); | 1484 char *tmp = g_markup_escape_text(text, -1); |
1485 gtk_imhtml_insert_html_at_iter(imhtml, tmp, 0, &iter); | 1485 gtk_imhtml_insert_html_at_iter(imhtml, tmp, 0, &iter); |
1486 g_free(tmp); | 1486 g_free(tmp); |
1487 } | 1487 } |
1488 break; | 1488 break; |
1489 default: | 1489 default: |