Allow to use shortcut also if query contains '://' (#104).
authorDaniel Carl <danielcarl@gmx.de>
Fri, 29 Aug 2014 08:35:37 +0000 (10:35 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 29 Aug 2014 08:35:37 +0000 (10:35 +0200)
src/main.c

index 682b476..46932dc 100644 (file)
@@ -186,7 +186,9 @@ gboolean vb_load_uri(const Arg *arg)
         path = GET_CHAR("home-page");
     }
 
-    if (strstr(path, "://") || !strncmp(path, "about:", 6)) {
+    /* If path contains :// but no space we open it direct. This is required
+     * to use :// also with shortcuts */
+    if ((strstr(path, "://") && !strchr(path, ' ')) || !strncmp(path, "about:", 6)) {
         uri = g_strdup(path);
     } else if (stat(path, &st) == 0) {
         /* check if the path is a file path */