]> spindle.queued.net Git - midori/commitdiff
Strip whitespace from the location entry input
authorChristian Dywan <christian@twotoasts.de>
Thu, 11 Jun 2009 21:31:02 +0000 (23:31 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 11 Jun 2009 21:31:02 +0000 (23:31 +0200)
midori/midori-browser.c

index d4a5afb947ab7de78a7392056dc2ab3d25882770..86b79cf0638d23ed41807e6a009581a31663a3f9 100644 (file)
@@ -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);