made search term escaping actuall escape all instances - also escapging \ chars now
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 25 Oct 2006 21:18:00 +0000 (21:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 25 Oct 2006 21:18:00 +0000 (21:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6512 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/adv_global.js
Open-ILS/web/opac/skin/default/js/result_common.js

index b83d6f7..b5f2fda 100644 (file)
@@ -176,7 +176,8 @@ function advBuildSearchBlob() {
                                break;
                }
                if(string) {
-                       string = string.replace(/'/,' ');
+                       string = string.replace(/'/g,' ');
+                       string = string.replace(/\\/g,' ');
                        searches[stype].term = string;
                }
        }
index a226fb1..9bce1fe 100644 (file)
@@ -45,7 +45,8 @@ function resultCollectSearchIds( type, method, handler ) {
                args.searches[getStype()] = {};
                var term = getTerm();
                if( term ) {
-                       term = term.replace(/'/,' ');
+                       term = term.replace(/'/g,' ');
+                       term = term.replace(/\\/g,' ');
                        args.searches[getStype()].term = term;
                }
 
@@ -83,6 +84,7 @@ function resultCollectSearchIds( type, method, handler ) {
        if(getLanguage()) args.language = getLanguage().split(/,/);
 
        //alert(js2JSON(args));
+
        _debug('SEARCH: \n' + js2JSON(args) + '\n\n');
        var req = new Request(method, args, 1);
        req.callback(handler);