From: erickson Date: Mon, 9 Jun 2008 21:49:23 +0000 (+0000) Subject: applying same text cleaning code to simple search that is used in advanced search X-Git-Url: https://git.evergreen-ils.org/?p=Evergreen.git;a=commitdiff_plain;h=1cb821af9bfa4b502dc6e5c5fbf49fe61c629f44 applying same text cleaning code to simple search that is used in advanced search git-svn-id: svn://svn.open-ils.org/ILS/trunk@9808 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/search_bar.js b/Open-ILS/web/opac/skin/default/js/search_bar.js index c87d494f75..5b6cccbb77 100644 --- a/Open-ILS/web/opac/skin/default/js/search_bar.js +++ b/Open-ILS/web/opac/skin/default/js/search_bar.js @@ -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;