summaryrefslogtreecommitdiffstats
path: root/quicksearch.js
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-06-19 04:24:17 +0200
committerjake%acutex.net <>2001-06-19 04:24:17 +0200
commit7de34a381387fefc06ff2ef2df1cfdb052ed521d (patch)
tree26b50b6c0563423034eaa8583585f84506ca36d9 /quicksearch.js
parent4fdd6b8ccb7e11a1d4bd6cf85552622409aca758 (diff)
downloadbugzilla-7de34a381387fefc06ff2ef2df1cfdb052ed521d.tar.gz
bugzilla-7de34a381387fefc06ff2ef2df1cfdb052ed521d.tar.xz
Fix for bug 85832 - QuickSearch should strip leading and trailing spaces.
Patch by Andreas Franke <afranke@ags.uni-sb.de>
Diffstat (limited to 'quicksearch.js')
-rw-r--r--quicksearch.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/quicksearch.js b/quicksearch.js
index fa2c474e4..7fa9a02f5 100644
--- a/quicksearch.js
+++ b/quicksearch.js
@@ -708,6 +708,9 @@ function QuickSearch ()
{
var input = document.f.id.value;
+ //remove leading and trailing whitespace
+ input = input.replace(/^[\s]+/,"").replace(/[\s]+$/,"");
+
if (input == "")
{
//once this _is_ on http://bugzilla.mozilla.org, it should just return;
@@ -733,6 +736,10 @@ function QuickSearch ()
function LoadQuery() {
var input = document.f.id.value;
+
+ //remove leading and trailing whitespace
+ input = input.replace(/^[\s]+/,"").replace(/[\s]+$/,"");
+
Search(bugzilla+"query.cgi",input,false);
return;
}