# HG changeset patch # User Nathan Walp # Date 1054397529 0 # Node ID 4a1f973124123d4e83ae7ccd0005d0f7ba6de972 # Parent eaf058fc47a5114d4aa916ffeca14c65b4e891d8 [gaim-migrate @ 6016] properly escape things in accounts.xml committer: Tailor Script diff -r eaf058fc47a5 -r 4a1f97312412 src/account.c --- a/src/account.c Sat May 31 15:55:06 2003 +0000 +++ b/src/account.c Sat May 31 16:12:09 2003 +0000 @@ -708,6 +708,7 @@ { GaimPlugin *plugin; const char *password, *alias, *user_info, *buddy_icon; + char *esc; plugin = gaim_find_prpl(gaim_account_get_protocol(account)); @@ -715,22 +716,34 @@ fprintf(fp, " %s\n", (plugin != NULL && plugin->info != NULL && plugin->info->id != NULL ? plugin->info->id : "unknown")); - fprintf(fp, " %s\n", gaim_account_get_username(account)); + esc = g_markup_escape_text(gaim_account_get_username(account), -1); + fprintf(fp, " %s\n", esc); + g_free(esc); if (gaim_account_get_remember_password(account) && (password = gaim_account_get_password(account)) != NULL) { + esc = g_markup_escape_text(password, -1); + fprintf(fp, " %s\n", esc); + g_free(esc); + } - fprintf(fp, " %s\n", password); + if ((alias = gaim_account_get_alias(account)) != NULL) { + esc = g_markup_escape_text(alias, -1); + fprintf(fp, " %s\n", esc); + g_free(esc); } - if ((alias = gaim_account_get_alias(account)) != NULL) - fprintf(fp, " %s\n", alias); + if ((user_info = gaim_account_get_user_info(account)) != NULL) { + esc = g_markup_escape_text(user_info, -1); + fprintf(fp, " %s\n", esc); + g_free(esc); + } - if ((user_info = gaim_account_get_user_info(account)) != NULL) - fprintf(fp, " %s\n", user_info); - - if ((buddy_icon = gaim_account_get_buddy_icon(account)) != NULL) - fprintf(fp, " %s\n", buddy_icon); + if ((buddy_icon = gaim_account_get_buddy_icon(account)) != NULL) { + esc = g_markup_escape_text(buddy_icon, -1); + fprintf(fp, " %s\n", esc); + g_free(esc); + } fprintf(fp, " \n"); g_hash_table_foreach(account->settings, __write_setting, fp);