[open-ils-commits] r9808 - trunk/Open-ILS/web/opac/skin/default/js

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jun 9 17:49:27 EDT 2008


Author: erickson
Date: 2008-06-09 17:49:23 -0400 (Mon, 09 Jun 2008)
New Revision: 9808

Modified:
   trunk/Open-ILS/web/opac/skin/default/js/search_bar.js
Log:
applying same text cleaning code to simple search that is used in advanced search

Modified: trunk/Open-ILS/web/opac/skin/default/js/search_bar.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/search_bar.js	2008-06-09 21:49:07 UTC (rev 9807)
+++ trunk/Open-ILS/web/opac/skin/default/js/search_bar.js	2008-06-09 21:49:23 UTC (rev 9808)
@@ -55,6 +55,12 @@
 	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;
 



More information about the open-ils-commits mailing list