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.
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);
}