[open-ils-commits] r9807 - branches/rel_1_2/Open-ILS/web/opac/skin/default/js

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


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

Modified:
   branches/rel_1_2/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: branches/rel_1_2/Open-ILS/web/opac/skin/default/js/search_bar.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/skin/default/js/search_bar.js	2008-06-09 21:48:32 UTC (rev 9806)
+++ branches/rel_1_2/Open-ILS/web/opac/skin/default/js/search_bar.js	2008-06-09 21:49:07 UTC (rev 9807)
@@ -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