diff options
author | jake%acutex.net <> | 2001-06-19 04:24:17 +0200 |
---|---|---|
committer | jake%acutex.net <> | 2001-06-19 04:24:17 +0200 |
commit | 7de34a381387fefc06ff2ef2df1cfdb052ed521d (patch) | |
tree | 26b50b6c0563423034eaa8583585f84506ca36d9 /quicksearch.js | |
parent | 4fdd6b8ccb7e11a1d4bd6cf85552622409aca758 (diff) | |
download | bugzilla-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.js | 7 |
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; } |