Bug 1035335 - Don't convert number query for searches. r=mfinkle, a=sledru
authorBrian Nicholson <bnicholson@mozilla.com>
Fri, 11 Jul 2014 13:12:44 -0700
changeset 209030 2bedaba8b90cbf9906cf86a47822e469a9881184
parent 209029 0e13ae310139f84683aaefe091b22f4124372be7
child 209031 c744f39ead1f356c2381a3db5a54dcc6aecfe809
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, sledru
bugs1035335
milestone32.0a2
Bug 1035335 - Don't convert number query for searches. r=mfinkle, a=sledru
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1519,18 +1519,19 @@ var BrowserApp = {
         break;
       }
 
       case "Tab:Load": {
         let data = JSON.parse(aData);
         let url = data.url;
         let flags;
 
-        if (/^[0-9]+$/.test(url)) {
-          // If the query is a number, force a search (see bug 993705; workaround for bug 693808).
+        if (!data.engine && /^[0-9]+$/.test(url)) {
+          // If the query is a number and we're not using a search engine,
+          // force a search (see bug 993705; workaround for bug 693808).
           url = URIFixup.keywordToURI(url).spec;
         } else {
           flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
                    Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
         }
 
         // Pass LOAD_FLAGS_DISALLOW_INHERIT_OWNER to prevent any loads from
         // inheriting the currently loaded document's principal.