From 8fa08de8892b288a0fcc48a21375553f994f975e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 24 Nov 2011 12:02:59 -0500 Subject: Bug 664654 - Sanitize subjects before suggesting a save filename --- shell/e-shell-utils.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c index b5a1f490ae..eef69d6182 100644 --- a/shell/e-shell-utils.c +++ b/shell/e-shell-utils.c @@ -33,6 +33,8 @@ #include +#include + #include "widgets/misc/e-import-assistant.h" /** @@ -165,8 +167,14 @@ e_shell_run_save_dialog (EShell *shell, gtk_file_chooser_set_local_only (file_chooser, FALSE); gtk_file_chooser_set_do_overwrite_confirmation (file_chooser, TRUE); - if (suggestion != NULL) - gtk_file_chooser_set_current_name (file_chooser, suggestion); + if (suggestion != NULL) { + gchar *current_name; + + current_name = g_strdup (suggestion); + e_filename_make_safe (current_name); + gtk_file_chooser_set_current_name (file_chooser, current_name); + g_free (current_name); + } if (filters != NULL) { gchar **flts = g_strsplit (filters, ";", -1); -- cgit v1.2.3