comparison src/account.c @ 10774:d83f745c997b

[gaim-migrate @ 12383] Some escaping stuff, all over the place. Various escaping fixes in the IRC prpl. The core and plugins only need to escape text if it's going to be shown in a gtkimhtml or equivalent - such as writing to a conversation window, or gaim_notify_{formatted,userinfo} The primary and secondary text for all notify and request API functions do NOT need to be escaped by the core or plugins, because whether html-like markup is required for these is UI dependent. Now we always escape these in the Gtk UI request & notify ops. Should I backport any of the above to oldstatus? I also removed gaim_chat_get_display_name() - it was almost a duplicate of gaim_chat_get_name(), and it leaked. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 02 Apr 2005 17:18:43 +0000
parents f93ed7f6ecc7
children 885377f484b7
comparison
equal deleted inserted replaced
10773:888d4c328be5 10774:d83f745c997b
773 */ 773 */
774 static void 774 static void
775 request_password(GaimAccount *account) 775 request_password(GaimAccount *account)
776 { 776 {
777 gchar *primary; 777 gchar *primary;
778 gchar *escaped;
779 const gchar *username; 778 const gchar *username;
780 779
781 /* Close any previous password request windows */ 780 /* Close any previous password request windows */
782 gaim_request_close_with_handle(account); 781 gaim_request_close_with_handle(account);
783 782
784 username = gaim_account_get_username(account); 783 username = gaim_account_get_username(account);
785 escaped = g_markup_escape_text(username, strlen(username)); 784 primary = g_strdup_printf(_("Enter password for %s (%s)"), username,
786 primary = g_strdup_printf(_("Enter password for %s (%s)"), escaped,
787 gaim_account_get_protocol_name(account)); 785 gaim_account_get_protocol_name(account));
788 gaim_request_input(account, _("Enter Password"), primary, NULL, NULL, 786 gaim_request_input(account, _("Enter Password"), primary, NULL, NULL,
789 FALSE, TRUE, NULL, 787 FALSE, TRUE, NULL,
790 _("OK"), G_CALLBACK(request_password_ok_cb), 788 _("OK"), G_CALLBACK(request_password_ok_cb),
791 _("Cancel"), NULL, account); 789 _("Cancel"), NULL, account);
792 g_free(primary); 790 g_free(primary);
793 g_free(escaped);
794 } 791 }
795 792
796 void 793 void
797 gaim_account_connect(GaimAccount *account) 794 gaim_account_connect(GaimAccount *account)
798 { 795 {