[tor-commits] [atlas/master] strip whitespaces in search
karsten at torproject.org
karsten at torproject.org
Mon Jan 14 09:28:09 UTC 2013
commit 5d6e5dab309472aea06d580dbc96ba50e9c2ed00
Author: Sathyanarayanan Gunasekaran <gsathya.ceg at gmail.com>
Date: Fri Jan 4 22:05:07 2013 +0530
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/js/router.js
+++ b/js/router.js
@@ -105,6 +105,7 @@ define([
$("#nav-search").submit(function(e){
var query = _.escape($(this).children("input.search-query").val());
+ query = query.trim();
console.log(query);
$("#suggestion").hide();
document.location = "#search/"+query;
More information about the tor-commits
mailing list