only filter [^\w\s] with names on patron search
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Aug 2006 18:01:57 +0000 (18:01 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Aug 2006 18:01:57 +0000 (18:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5496 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/search_form.js

index 59040c9..1697805 100644 (file)
@@ -224,7 +224,13 @@ patron.search_form.prototype = {
                                } else {
                                        var value = node.value.replace(/^\s+/,'').replace(/[\\\s]+$/,'');
                                        //value = value.replace(/\d/g,'');
-                                       value = value.replace(/[^\w\s]/g,'');
+                                       switch(id) {
+                                               case 'family_name' :
+                                               case 'first_given_name' :
+                                               case 'second_given_name' :
+                                                       value = value.replace(/[^\w\s]/g,'');
+                                               break;
+                                       }
                                        if (value != '') {
                                                query += id + '=' + window.escape(value);
                                                obj.error.sdump('D_DEBUG','id = ' + id + '  value = ' + value + '\n');