From: phasefx Date: Thu, 3 Aug 2006 19:37:00 +0000 (+0000) Subject: strip leading spaces and trailing spaces and backslashes from patron search params X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4cd229295ba7db98498e23a5cfdb6b632b1e7f26;p=evergreen%2Fpines.git strip leading spaces and trailing spaces and backslashes from patron search params git-svn-id: svn://svn.open-ils.org/ILS/trunk@5258 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.js b/Open-ILS/xul/staff_client/server/patron/search_form.js index bcc8926d86..4181e02147 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form.js +++ b/Open-ILS/xul/staff_client/server/patron/search_form.js @@ -222,8 +222,9 @@ patron.search_form.prototype = { query += id + '=' + window.escape(node.getAttribute('value')); dump('id = ' + id + ' value = ' + node.getAttribute('value') + '\n'); } else { - query += id + '=' + window.escape(node.value); - dump('id = ' + id + ' value = ' + node.value + '\n'); + var value = node.value.replace(/^\s+/,'').replace(/[\\\s]+$/,''); + query += id + '=' + window.escape(value); + dump('id = ' + id + ' value = ' + value + '\n'); } } }