aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-25 01:02:59 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-25 01:05:12 +0800
commit8fa08de8892b288a0fcc48a21375553f994f975e (patch)
tree9abe21019c5fc53d158588b4c73f1fdf047f447c /shell
parent4169ce41cc34d992ebd63b1bcc8f604e69aea89a (diff)
downloadgsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.tar
gsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.tar.gz
gsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.tar.bz2
gsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.tar.lz
gsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.tar.xz
gsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.tar.zst
gsoc2013-evolution-8fa08de8892b288a0fcc48a21375553f994f975e.zip
Bug 664654 - Sanitize subjects before suggesting a save filename
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-utils.c12
1 files changed, 10 insertions, 2 deletions
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 <glib/gi18n-lib.h>
+#include <libedataserver/e-data-server-util.h>
+
#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);