From 2421a3163fe98f163497b9216d6a1a5fdb36223f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 19 Mar 2009 23:37:32 +0100 Subject: [PATCH] Strip selection from spaces when middle click opening It happens every so often that you quickly select an address and there's leading or trailing space you accidentally hit. So we strip the selection, otherwise such addresses don't work. --- midori/midori-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index a7c5ff9b..36b0b64d 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -807,7 +807,7 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, gtk_widget_get_display (GTK_WIDGET (view)), GDK_SELECTION_PRIMARY); uri = gtk_clipboard_wait_for_text (clipboard); - if (uri && strchr (uri, '.') && !strchr (uri, ' ')) + if (uri && strchr (uri, '.') && !strchr (g_strstrip (uri), ' ')) { new_uri = sokoke_magic_uri (uri, NULL); if (event->state & GDK_CONTROL_MASK)