From 4cd229295ba7db98498e23a5cfdb6b632b1e7f26 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 3 Aug 2006 19:37:00 +0000 Subject: [PATCH] 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 --- Open-ILS/xul/staff_client/server/patron/search_form.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'); } } } -- 2.11.0