Check also for shortcut URIs if path contains '.'.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 1 May 2013 09:54:09 +0000 (11:54 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 1 May 2013 09:54:09 +0000 (11:54 +0200)
The shortcut URIs where only checked if the given path variable contained no
dot. This made it impossible to easily search via shortcut URI for params like
'document.activeElement'. This patch lookup the shortcut URIs also if the
given path contains spaces, to avoid this misbehaviour.

src/main.c

index 892ab26..dfbdf69 100644 (file)
@@ -143,8 +143,8 @@ gboolean vb_load_uri(const Arg *arg)
         rp  = realpath(path, NULL);
         uri = g_strdup_printf("file://%s", rp);
         free(rp);
-    } else if (!strchr(path, '.')) {
-        /* use a shortcut */
+    } else if (strchr(path, ' ') || !strchr(path, '.')) {
+        /* use a shortcut if path contains spaces or no dot */
         uri = shortcut_get_uri(path);
     }