From f85e07c3154e75502a25216f6223f131d0a2173b Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Fri, 6 Jun 2008 11:36:51 +0000 Subject: [PATCH] keywords have higher priority than local files in :open fixed S in noscript --- NEWS | 4 ++++ content/util.js | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 88e25d27..994798d7 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,8 @@
+2008-06-xx:
+    * version 1.2
+    * keywords in :open  have higher priority than local files now
+
 2008-06-03:
     * version 1.1
     * IMPORTANT: security update for suggest engines
diff --git a/content/util.js b/content/util.js
index d0ffd2cb..b3b3cd19 100644
--- a/content/util.js
+++ b/content/util.js
@@ -285,9 +285,10 @@ liberator.util = { //{{{
             // strip each 'URL' - makes things simpler later on
             urls[url] = urls[url].replace(/^\s+/, "").replace(/\s+$/, "");
 
-            // first check if it is an existing local file
+            // first check if it is an existing local file but NOT a search url/keyword
+            // NOTE: the test for being a file is done first, because it's faster than getSearchURL
             var file = liberator.io.getFile(urls[url]);
-            if (file.exists() && file.isReadable())
+            if (file.exists() && file.isReadable() && !liberator.bookmarks.getSearchURL("", urls[url]))
             {
                 urls[url] = file.path;
                 continue;