Bug 1149548 - getURLAndPostDataForKeyword should lower-case the keyword before checking agaist the database. r=mak, a=lizzard
authorPhilip Chee <philip.chee@gmail.com>
Fri, 03 Apr 2015 04:20:00 -0400
changeset 265517 768b8d2dada8fc3a58ab3a44a3f679a2cb1345a6
parent 265516 5174d1db7188d06eba139f8b1a42edf432746358
child 265518 b852e95d2f6c1b7ad9e060f4ba1967164c90aefa
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, lizzard
bugs1149548
milestone39.0a2
Bug 1149548 - getURLAndPostDataForKeyword should lower-case the keyword before checking agaist the database. r=mak, a=lizzard
toolkit/components/places/PlacesUtils.jsm
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -940,17 +940,17 @@ this.PlacesUtils = {
                        "use PlacesUtils.keywords.fetch() instead",
                        "https://bugzilla.mozilla.org/show_bug.cgi?id=1100294");
 
     let stmt = PlacesUtils.history.DBConnection.createStatement(
       `SELECT h.url, k.post_data
        FROM moz_keywords k
        JOIN moz_places h ON h.id = k.place_id
        WHERE k.keyword = :keyword`);
-    stmt.params.keyword = aKeyword;
+    stmt.params.keyword = aKeyword.toLowerCase();
     try {
       if (!stmt.executeStep())
         return [ null, null ];
       return [ stmt.row.url, stmt.row.post_data ];
     }
     finally {
       stmt.finalize();
     }