From 1b6f9b5500c260d4e39e06c7a2e40b66aaf6bb00 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Wed, 1 May 2013 11:54:09 +0200 Subject: [PATCH] Check also for shortcut URIs if path contains '.'. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 892ab26..dfbdf69 100644 --- a/src/main.c +++ b/src/main.c @@ -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); } -- 2.20.1