From: Christian Dywan Date: Thu, 11 Jun 2009 21:31:02 +0000 (+0200) Subject: Strip whitespace from the location entry input X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd19d34410d993e41f9db0696ff0d19d235b157f;p=midori Strip whitespace from the location entry input --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index d4a5afb9..86b79cf0 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -2991,10 +2991,14 @@ _action_location_submit_uri (GtkAction* action, gboolean new_tab, MidoriBrowser* browser) { + gchar* stripped_uri; gchar* new_uri; gint n; - new_uri = sokoke_magic_uri (uri, browser->search_engines); + stripped_uri = g_strdup (uri); + g_strstrip (stripped_uri); + new_uri = sokoke_magic_uri (stripped_uri, browser->search_engines); + g_free (stripped_uri); if (!new_uri) new_uri = sokoke_search_uri (browser->location_entry_search, uri);