applying same text cleaning code to simple search that is used in advanced search
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Jun 2008 21:49:23 +0000 (21:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Jun 2008 21:49:23 +0000 (21:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9808 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/search_bar.js

index c87d494..5b6cccb 100644 (file)
@@ -55,6 +55,12 @@ function searchBarSubmit(isFilterSort) {
        clearSearchParams();
 
        if(!text || text == "") return;
+
+    text = text.replace(/'/g,' ');
+    text = text.replace(/\\/g,' ');
+    text = text.replace(/^\s*/,'');
+    text = text.replace(/\s*$/,'');
+
        var d   = (newSearchDepth != null) ?  newSearchDepth : depthSelGetDepth();
        if(isNaN(d)) d = 0;