Author: jaz
Date: Sun May 20 20:47:33 2007
New Revision: 540008

URL: http://svn.apache.org/viewvc?view=rev&rev=540008
Log:
added code to strip off weird characters

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java

Modified: 
ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java?view=diff&rev=540008&r1=540007&r2=540008
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java 
(original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java 
Sun May 20 20:47:33 2007
@@ -182,6 +182,9 @@
         
         Set keywords = new TreeSet();
         if (str.length() > 0) {
+            // strip off weird characters
+            str = str.replaceAll("\\\302\\\240|\\\240", "\\s");
+            
             if (forSearch) {
                 // remove %_*? from separators if is for a search
                 StringBuffer sb = new StringBuffer(separators);


Reply via email to