From dbec52ebe2d7708b8d0a91343326cbff6b61cef6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 20 Aug 2013 12:17:21 +0200 Subject: Bug #656804 - Cannot create folder with special characters in name --- mail/em-folder-selector.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index e64f58d380..7d35674e11 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -449,11 +449,13 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs) if (emfs->name_entry) { const gchar *name; - gchar *temp_uri; + gchar *temp_uri, *escaped_name; name = gtk_entry_get_text (emfs->name_entry); - temp_uri = g_strconcat (uri, "/", name, NULL); + escaped_name = g_uri_escape_string (name, NULL, TRUE); + temp_uri = g_strconcat (uri, "/", escaped_name, NULL); + g_free (escaped_name); g_free (uri); uri = temp_uri; } -- cgit