Ticket #7861: 0001-strip-whitespaces-in-search.2.patch

File 0001-strip-whitespaces-in-search.2.patch, 701 bytes (added by gsathya, 7 years ago)
  • js/router.js

    From b9d4d84d43422b4da885454ac9497cbbffffd242 Mon Sep 17 00:00:00 2001
    From: Sathyanarayanan Gunasekaran <gsathya.ceg@gmail.com>
    Date: Fri, 4 Jan 2013 22:05:07 +0530
    Subject: [PATCH] strip whitespaces in search
    
    ---
     js/router.js |    1 +
     1 files changed, 1 insertions(+), 0 deletions(-)
    
    diff --git a/js/router.js b/js/router.js
    index 3fd4a8b..543b8b4 100644
    a b define([ 
    105105
    106106    $("#nav-search").submit(function(e){
    107107        var query = _.escape($(this).children("input.search-query").val());
     108        query = query.trim();
    108109        console.log(query);
    109110        $("#suggestion").hide();
    110111        document.location = "#search/"+query;